fix: use basename for shell detection to support non-standard paths (#5205)
Co-authored-by: Ayato French <a@ayatofrench.com>pull/5145/head
parent
c16d8c6db8
commit
238b907dd8
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue