fix(exec): suppress fish startup config in fallback shell
This commit is contained in:
parent
acb1b7ba4e
commit
b831c7bce7
@ -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", () => {
|
||||
|
||||
@ -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"];
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user