fix(windows): align escaped wrapper shell handling

Use ComSpec-aware shell selection for escaped wrapper launches.

Apply it to the remaining Windows Claude launch paths.

Rewrite the Codex exec regression test to use scoped spies so the full suite stays isolated.
This commit is contained in:
Tam Nhu Tran committed 2026-04-19 14:27:27 -04:00
1 parent a945b0b104
commit ccdd0b6e8e
6 files changed
+117 -64

No files matched your search

+6 -2
View File
@@ -6,7 +6,11 @@
*/
import { spawn, ChildProcess, SpawnOptions } from 'child_process';
import { escapeShellArg, stripClaudeCodeEnv } from './shell-executor';
import {
escapeShellArg,
getWindowsEscapedCommandShell,
stripClaudeCodeEnv,
} from './shell-executor';
import { getClaudeCliInfo } from './claude-detector';
import { ErrorManager } from './error-manager';
@@ -56,7 +60,7 @@ export function spawnClaude(options: SpawnClaudeOptions = {}): SpawnClaudeResult
child = spawn(cmdString, {
stdio,
windowsHide: true,
shell: true,
shell: getWindowsEscapedCommandShell(),
env: mergedEnv,
cwd,
});