fix: enable shell for terminal spawn on Windows#173
Conversation
Triage resultHuman attention: Quick readThis PR addresses a real Windows bug in ACP terminal spawning. The targeted regression was reproduced and shown fixed, the branch is conflict-clean against IntentMake ACP terminal commands work on Windows so commands like WhyThe underlying problem is that Codex reviewGitHub Codex review data for the current head is empty. The established local Codex review for the refreshed head reports no remaining P0/P1 issues. There is one non-blocking P2 note about case-insensitive CI/CDThe current RecommendationRecommendation: 🏁 escalate to a human. This is ready for human landing decision. If the remaining non-blocking P2 is acceptable to defer, the PR is in a good state to land from the current head. |
On Windows, Node.js child_process.spawn() without shell:true does not use cmd.exe to resolve commands from PATH. This causes every terminal command to fail with ENOENT. Linux/macOS kernels handle PATH resolution during execve(), so only Windows needs the shell flag. Closes openclaw#169
0635be7 to
d0525df
Compare
|
Landed via temp rebase onto main.\n\n- Gate: validation completed for this repo's change scope\n- Land commit: d0525df\n- Merge commit: 6e0b939\n\nThanks @Bortlesboat! |
Summary
shell: process.platform === "win32"tobuildTerminalSpawnOptions()so terminal commands resolve from PATH on Windowschild_process.spawn()withoutshell: truedoesn't usecmd.exefor PATH resolution, causing every terminal command to fail withENOENTexecve(), soshellis only enabled on WindowsTest plan
spawn-options.test.tsverifyingshellis always a booleanoxlint,oxfmt, andtsc --noEmitcleanCloses #169