fix: support fish shell (#1911)

pull/1929/head
Aiden Cline 2025-08-13 20:04:04 -05:00 committed by GitHub
parent bb4b24a05f
commit 4dea0209bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -1055,7 +1055,13 @@ export namespace Session {
[[ -f ~/.bashrc ]] && source ~/.bashrc >/dev/null 2>&1 || true
eval "${input.command}"
`
const proc = spawn(process.env["SHELL"] ?? "bash", ["-c", "-l", script], {
const shell = process.env["SHELL"] ?? "bash"
const isFish = shell.includes("fish")
const args = isFish
? ["-c", script] // fish with just -c
: ["-c", "-l", script]
const proc = spawn(shell, args, {
cwd: app.path.cwd,
signal: abort.signal,
env: {