fix(dev): use shell on Windows to avoid EINVAL when spawning tsx.cmd#558
fix(dev): use shell on Windows to avoid EINVAL when spawning tsx.cmd#558MicroGery wants to merge 2 commits into
Conversation
Node.js v24 requires shell: true on Windows to spawn .cmd executables. Without it, spawn throws EINVAL and the dev CLI cannot start. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a3ac04138
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Resolve #549
Problem
On Windows with Node.js v24,
pnpm dev:clifails to start. The dev launcher (apps/kimi-code/scripts/dev.mjs) spawns thetsxbinary, which on Windows resolves totsx.cmd. Node v24 refuses to spawn.cmdfiles withoutshell: trueand throwsEINVAL, so the dev CLI never launches.What changed
Pass
shell: process.platform === 'win32'to thespawn()call. Shell mode is enabled only on Windows, leaving macOS / Linux behaviour unchanged (no extra shell layer, no command-injection surface on those platforms).Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.