fix: quote Windows paths with spaces in UI runner command

This commit is contained in:
walker 2026-01-30 09:26:11 +08:00
parent 4583f88626
commit e2383de3a1

View File

@ -101,6 +101,11 @@ if (!runner) {
process.stderr.write("Missing UI runner: install pnpm, then retry.\n"); process.stderr.write("Missing UI runner: install pnpm, then retry.\n");
process.exit(1); process.exit(1);
} }
// On Windows, paths with spaces (e.g. C:\Program Files\...) must be quoted
// so the shell does not split them.
if (process.platform === "win32" && runner.cmd.includes(" ")) {
runner.cmd = `"${runner.cmd}"`;
}
const script = const script =
action === "install" action === "install"