mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix: use basename for shell detection to support non-standard paths (#5205)
Co-authored-by: Ayato French <a@ayatofrench.com>
This commit is contained in:
parent
c16d8c6db8
commit
238b907dd8
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue