Browse Source

fix: make bash tool respect $SHELL (#3494)

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Ivan Starkov 9 months ago
parent
commit
b5d0c56b4c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/opencode/src/tool/bash.ts

+ 1 - 1
packages/opencode/src/tool/bash.ts

@@ -183,7 +183,7 @@ export const BashTool = Tool.define("bash", {
     }
     }
 
 
     const proc = spawn(params.command, {
     const proc = spawn(params.command, {
-      shell: true,
+      shell: process.env.SHELL ?? true, // $SHELL if set, otherwise default shell
       cwd: Instance.directory,
       cwd: Instance.directory,
       env: {
       env: {
         ...process.env,
         ...process.env,