Fix Windows server build command quoting#2466
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved Straightforward bug fix in build tooling that removes shell mode for Windows to fix path quoting issues when paths contain spaces. Minimal scope, clear intent, and no production runtime impact. You can customize Macroscope's approvability policy. Learn more. |
What Changed
Fixes the Windows server build path used by
apps/server/scripts/cli.ts.The build command was launching
process.execPathwithshell: trueon Windows. That breaks when the executable path contains spaces, which causedbun run dist:desktop:win:x64to fail during the server build step with'C:\Program' is not recognized....This change removes the Windows shell hop for that specific command, since
process.execPathis already an absolute executable path.Why
Building the Windows desktop installer should work reliably on normal Windows setups, including machines where Node/Bun lives under
C:\Program Files\....This is a small, targeted bug fix:
I verified that a fresh
bun run dist:desktop:win:x64now succeeds after this change.Checklist
Note
Low Risk
Low risk: a small, targeted change to process spawning in the build CLI, affecting only how the bundle command is invoked on Windows.
Overview
Fixes the
apps/serverbuild CLI so thebuild:bundlestep no longer usesshellon Windows when spawningprocess.execPath, avoiding failures when the executable path contains spaces (e.g.,C:\Program Files\...).Reviewed by Cursor Bugbot for commit 3559abe. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix Windows build command quoting by removing shell invocation in
buildCmdOn Windows, launching a child process via the shell can fail when
process.execPathcontains spaces. Theshell: process.platform === 'win32'option is removed from theChildProcess.makecall in cli.ts, so the build process is now invoked directly with the absolute executable path.Macroscope summarized 3559abe.