fix: trim windows dev update preflight

This commit is contained in:
Peter Steinberger
2026-04-21 04:31:22 +01:00
parent 817f861167
commit 6f5b7120b8
2 changed files with 18 additions and 11 deletions

View File

@@ -701,6 +701,7 @@ describe("runGatewayUpdate", () => {
);
expect(result.steps.map((step) => step.name)).toContain("deps install (ignore scripts)");
expect(calls).toContain("pnpm install --ignore-scripts");
expect(calls).not.toContain("pnpm lint");
} finally {
platformSpy.mockRestore();
}

View File

@@ -503,6 +503,10 @@ function mergeCommandEnvironments(
};
}
function shouldRunDevPreflightLint(): boolean {
return process.platform !== "win32";
}
export async function runGatewayUpdate(opts: UpdateRunnerOptions = {}): Promise<UpdateRunResult> {
const startedAt = Date.now();
const defaultCommandEnv = await createGlobalInstallEnv();
@@ -885,17 +889,19 @@ export async function runGatewayUpdate(opts: UpdateRunnerOptions = {}): Promise<
continue;
}
const lintStep = await runStep(
step(
`preflight lint (${shortSha})`,
managerScriptArgs(manager.manager, "lint"),
worktreeDir,
manager.env,
),
);
steps.push(lintStep);
if (lintStep.exitCode !== 0) {
continue;
if (shouldRunDevPreflightLint()) {
const lintStep = await runStep(
step(
`preflight lint (${shortSha})`,
managerScriptArgs(manager.manager, "lint"),
worktreeDir,
manager.env,
),
);
steps.push(lintStep);
if (lintStep.exitCode !== 0) {
continue;
}
}
selectedSha = sha;