From b831c7bce7411ce65f8a8bdbd0be712d56c69ecd Mon Sep 17 00:00:00 2001 From: NewdlDewdl Date: Sun, 8 Mar 2026 16:24:33 -0500 Subject: [PATCH] fix(exec): suppress fish startup config in fallback shell --- src/agents/shell-utils.test.ts | 2 +- src/agents/shell-utils.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/agents/shell-utils.test.ts b/src/agents/shell-utils.test.ts index 40e745063f2..99dca3fba19 100644 --- a/src/agents/shell-utils.test.ts +++ b/src/agents/shell-utils.test.ts @@ -68,7 +68,7 @@ describe("getShellConfig", () => { process.env.PATH = ""; const { shell, args } = getShellConfig(); expect(shell).toBe("/usr/bin/fish"); - expect(args).toEqual(["-c"]); + expect(args).toEqual(["--no-config", "-c"]); }); it("uses zsh no-rc mode to avoid startup-file env overrides", () => { diff --git a/src/agents/shell-utils.ts b/src/agents/shell-utils.ts index f9be1b368c0..e23a2bf600d 100644 --- a/src/agents/shell-utils.ts +++ b/src/agents/shell-utils.ts @@ -50,6 +50,9 @@ function resolvePosixShellArgs(shellPath: string): string[] { if (shellName === "bash") { return ["--noprofile", "--norc", "-c"]; } + if (shellName === "fish") { + return ["--no-config", "-c"]; + } return ["-c"]; }