diff --git a/src/shell/util.ts b/src/shell/util.ts index 1e3d40d7..29976d83 100644 --- a/src/shell/util.ts +++ b/src/shell/util.ts @@ -16,9 +16,9 @@ export function getDefaultShellArgs(): string[] { switch (os.platform()) { case 'darwin': return ['-df']; // Prevent loading initialization files for zsh - case 'win32': + case 'linux': + return ['--noprofile', '--norc']; + default: return []; - default: // Linux and others - return ['--noprofile --norc']; } } diff --git a/tests/unit/shell/util.test.ts b/tests/unit/shell/util.test.ts index 68d04087..7ddb23cf 100644 --- a/tests/unit/shell/util.test.ts +++ b/tests/unit/shell/util.test.ts @@ -35,9 +35,9 @@ describe('shell utilities', () => { expect(getDefaultShellArgs()).toEqual([]); }); - it('should return empty array on Linux', () => { + it('should return noprofile and norc on Linux', () => { vi.spyOn(os, 'platform').mockReturnValue('linux'); - expect(getDefaultShellArgs()).toEqual(['--noprofile --norc']); + expect(getDefaultShellArgs()).toEqual(['--noprofile', '--norc']); }); }); });