Przeglądaj źródła

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

Co-authored-by: Ayato French <[email protected]>
secretninjaman 2 miesięcy temu
rodzic
commit
238b907dd8
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      packages/opencode/src/tool/bash.ts

+ 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
       }
     }