Browse Source

fix bash tool wsl

Aiden Cline 11 months ago
parent
commit
27ae341684
1 changed files with 6 additions and 0 deletions
  1. 6 0
      packages/opencode/src/tool/bash.ts

+ 6 - 0
packages/opencode/src/tool/bash.ts

@@ -70,6 +70,12 @@ export const BashTool = Tool.define("bash", async () => {
       return "/bin/zsh"
     }
 
+    if (process.platform === "win32") {
+      // Let Bun / Node pick COMSPEC (usually cmd.exe)
+      // or explicitly:
+      return process.env.COMSPEC || true
+    }
+
     const bash = Bun.which("bash")
     if (bash) {
       return bash