Skip to content

Commit 8d1841b

Browse files
committed
fix(exec): suppress fish startup config in fallback shell
1 parent ff642cf commit 8d1841b

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/agents/shell-utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ describe("getShellConfig", () => {
7373
process.env.PATH = "";
7474
const { shell, args } = getShellConfig();
7575
expect(shell).toBe("/usr/bin/fish");
76-
expect(args).toEqual(["-c"]);
76+
expect(args).toEqual(["--no-config", "-c"]);
7777
});
7878

7979
it("uses zsh no-rc mode to avoid startup-file env overrides", () => {

src/agents/shell-utils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ function resolvePosixShellArgs(shellPath: string): string[] {
4949
if (shellName === "bash") {
5050
return ["--noprofile", "--norc", "-c"];
5151
}
52+
if (shellName === "fish") {
53+
return ["--no-config", "-c"];
54+
}
5255
return ["-c"];
5356
}
5457

0 commit comments

Comments
 (0)