diff --git a/src/process/exec.ts b/src/process/exec.ts index 44f8b2ce0..d8b4f48de 100644 --- a/src/process/exec.ts +++ b/src/process/exec.ts @@ -80,11 +80,13 @@ export async function runCommandWithTimeout( } const stdio = resolveCommandStdio({ hasInput, preferInherit: true }); + const isWindows = process.platform === "win32"; const child = spawn(argv[0], argv.slice(1), { stdio, cwd, env: resolvedEnv, windowsVerbatimArguments, + shell: isWindows, }); // Spawn with inherited stdin (TTY) so tools like `pi` stay interactive when needed. return await new Promise((resolve, reject) => {