fix(ui): quote cmd path for Windows spawn with spaces

This commit is contained in:
henrytien 2026-01-29 14:23:20 +08:00
parent 718bc3f9c8
commit 8d626c9cc6

View File

@ -51,7 +51,7 @@ function resolveRunner() {
}
function run(cmd, args) {
const child = spawn(cmd, args, {
const child = spawn(`"${cmd}"`, args, {
cwd: uiDir,
stdio: "inherit",
env: process.env,
@ -64,7 +64,7 @@ function run(cmd, args) {
}
function runSync(cmd, args, envOverride) {
const result = spawnSync(cmd, args, {
const result = spawnSync(`"${cmd}"`, args, {
cwd: uiDir,
stdio: "inherit",
env: envOverride ?? process.env,