mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 13:00:44 +00:00
fix: trim windows dev update preflight
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user