From 9cee1d81960dc7937791589b54c8c463f0fd7859 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Thu, 16 Apr 2026 17:05:08 +0700 Subject: [PATCH] fix(server): restore .cmd shell routing for Windows EINVAL --- packages/server/src/utils/spawn.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/utils/spawn.ts b/packages/server/src/utils/spawn.ts index 5e0bbaa18..f7a0b0881 100644 --- a/packages/server/src/utils/spawn.ts +++ b/packages/server/src/utils/spawn.ts @@ -24,7 +24,7 @@ export function spawnProcess( options?: SpawnOptions, ): ChildProcess { const isWindows = process.platform === "win32"; - const shell = options?.shell ?? isWindows; + const shell = isWindowsCommandScript(command) ? true : (options?.shell ?? isWindows); const shouldQuoteForShell = isWindows && shell !== false; const resolvedCommand = shouldQuoteForShell ? quoteWindowsCommand(command) : command;