mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-24 11:14:23 +01:00
fix: support fish shell (#1911)
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user