The open source coding agent.
TypeScript
fix: support fish shell (#1911)
Aiden Cline4dea0209bbeb
diff --git a/packages/opencode/src/session/index.ts b/packages/opencode/src/session/index.tsindex 41352f8b6f0..68c5fad8f31 100644--- a/packages/opencode/src/session/index.ts+++ b/packages/opencode/src/session/index.ts@@ -1055,7 +1055,13 @@ export namespace Session {[[ -f ~/.bashrc ]] && source ~/.bashrc >/dev/null 2>&1 || trueeval "${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: {