fix(exec): suppress fish startup config in fallback shell

This commit is contained in:
NewdlDewdl 2026-03-08 16:24:33 -05:00
parent acb1b7ba4e
commit b831c7bce7
2 changed files with 4 additions and 1 deletions

View File

@ -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", () => {

View File

@ -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"];
}