test(server): reproduce Windows EINVAL for .cmd shim with shell:false

This commit is contained in:
Mohamed Boudra
2026-04-16 17:00:01 +07:00
parent de33dfd034
commit c2a8e56d33
2 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ export function spawnProcess(
options?: SpawnOptions,
): ChildProcess {
const isWindows = process.platform === "win32";
const shell = isWindowsCommandScript(command) ? true : (options?.shell ?? isWindows);
const shell = options?.shell ?? isWindows;
const shouldQuoteForShell = isWindows && shell !== false;
const resolvedCommand = shouldQuoteForShell ? quoteWindowsCommand(command) : command;