From 4baf27837efcd8ca5151c85cc85c4019f01cafcc Mon Sep 17 00:00:00 2001 From: Gerkinfeltser Date: Tue, 3 Feb 2026 16:36:22 -0600 Subject: [PATCH] Fix Windows spawn compatibility for .cmd files - Add shell: true to spawn options for .cmd file execution on Windows - Add windowsHide: true to prevent console window from appearing - Remove detached: true which conflicts with shell: true on Windows Fixes spawn EINVAL error on Windows when launching opencode.cmd --- src/ProcessManager.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ProcessManager.ts b/src/ProcessManager.ts index 26bbcf4..cf56ce7 100644 --- a/src/ProcessManager.ts +++ b/src/ProcessManager.ts @@ -85,7 +85,8 @@ export class ProcessManager { cwd: this.projectDirectory, env: { ...process.env, NODE_USE_SYSTEM_CA: "1" }, stdio: ["ignore", "pipe", "pipe"], - detached: true, + shell: true, + windowsHide: true, } );