feat: add windows update package spec override

This commit is contained in:
Peter Steinberger
2026-03-12 23:56:48 +00:00
parent 91b701e183
commit d96069f0df
5 changed files with 97 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ import {
createGlobalInstallEnv,
cleanupGlobalRenameDirs,
globalInstallArgs,
resolveGlobalInstallSpec,
resolveGlobalPackageRoot,
} from "../../infra/update-global.js";
import { runGatewayUpdate, type UpdateRunResult } from "../../infra/update-runner.js";
@@ -277,6 +278,11 @@ async function runPackageInstallUpdate(params: {
const packageName =
(pkgRoot ? await readPackageName(pkgRoot) : await readPackageName(params.root)) ??
DEFAULT_PACKAGE_NAME;
const installSpec = resolveGlobalInstallSpec({
packageName,
tag: params.tag,
env: installEnv,
});
const beforeVersion = pkgRoot ? await readPackageVersion(pkgRoot) : null;
if (pkgRoot) {
@@ -288,7 +294,7 @@ async function runPackageInstallUpdate(params: {
const updateStep = await runUpdateStep({
name: "global update",
argv: globalInstallArgs(manager, `${packageName}@${params.tag}`),
argv: globalInstallArgs(manager, installSpec),
env: installEnv,
timeoutMs: params.timeoutMs,
progress: params.progress,