2
0
Эх сурвалжийг харах

fix: use basename for shell detection to support non-standard paths (#5205)

Co-authored-by: Ayato French <[email protected]>
secretninjaman 2 сар өмнө
parent
commit
238b907dd8

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

@@ -60,7 +60,8 @@ export const BashTool = Tool.define("bash", async () => {
   const shell = iife(() => {
     const s = process.env.SHELL
     if (s) {
-      if (!new Set(["/bin/fish", "/bin/nu", "/usr/bin/fish", "/usr/bin/nu"]).has(s)) {
+      const basename = path.basename(s);
+      if (!new Set(["fish", "nu"]).has(basename)) {
         return s
       }
     }