Skip to content

fix(build): remove shell:true from spawnSync so paths with spaces work on Windows#694

Draft
tobi wants to merge 1 commit into
mainfrom
fix/build-execpath-spaces-681
Draft

fix(build): remove shell:true from spawnSync so paths with spaces work on Windows#694
tobi wants to merge 1 commit into
mainfrom
fix/build-execpath-spaces-681

Conversation

@tobi
Copy link
Copy Markdown
Owner

@tobi tobi commented May 31, 2026

Fixes #681

Root cause

scripts/build.mjs's run() helper passed shell: process.platform === 'win32' to spawnSync. On Windows, this hands the command to cmd.exe unquoted, so a Node install at C:\Program Files\nodejs\node.exe gets split at the space — cmd.exe tries to execute C:\Program and fails silently (exit code not propagated). Result: dist/ is never produced, but npm run build reports success.

Fix

shell: false. spawnSync with a binary path + args array has never needed shell mode — that's only for passing a shell command string. The binary is invoked directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scripts/build.mjs mangles Windows process.execPath containing a space — silent install failure

1 participant