Skip to content

Commit d95611f

Browse files
committed
fix(release): scope package runner normalization to Windows
1 parent b4e5822 commit d95611f

2 files changed

Lines changed: 3 additions & 16 deletions

File tree

scripts/package-openclaw-for-docker.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,11 @@ function run(command, args, cwd, options = {}) {
222222
);
223223
const useProcessGroup = process.platform !== "win32";
224224
const env = options.env ?? process.env;
225+
// Keep POSIX command selection stable; only Windows needs explicit npm/pnpm shim handling.
225226
const invocation =
226-
command === "pnpm"
227+
process.platform === "win32" && command === "pnpm"
227228
? resolvePnpmRunner({ cwd, env, npmExecPath: env.npm_execpath, pnpmArgs: args })
228-
: command === "npm"
229+
: process.platform === "win32" && command === "npm"
229230
? resolveNpmRunner({ env, npmArgs: args })
230231
: { args, command, shell: false };
231232
const child = spawn(invocation.command, invocation.args, {

test/e2e/qa-lab/runtime/package-openclaw-for-docker.e2e.test.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,6 @@ describe("package-openclaw-for-docker", () => {
124124
},
125125
);
126126

127-
it.runIf(process.platform !== "win32")(
128-
"uses the npm resolver PATH when npm is absent from the caller PATH",
129-
async () => {
130-
const env = { ...process.env, PATH: "" };
131-
const output = await runCommandForTest("npm", ["--version"], process.cwd(), {
132-
captureStdout: true,
133-
env,
134-
timeoutMs: 30_000,
135-
});
136-
137-
expect(output.trim()).toMatch(/^\d+\.\d+\.\d+$/u);
138-
},
139-
);
140-
141127
it.runIf(process.platform === "win32")(
142128
"kills pnpm.cmd descendants when the package command times out",
143129
async () => {

0 commit comments

Comments
 (0)