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
This commit is contained in:
Gerkinfeltser
2026-02-03 16:36:22 -06:00
committed by Mateusz Tymek
parent 5b96a239f2
commit 4baf27837e

View File

@@ -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,
}
);