Skip to content

Commit

Permalink
target linux explicitly, preserve original fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-byrne committed Feb 9, 2025
1 parent f26edb9 commit a39e95d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/shell/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
}
}
4 changes: 2 additions & 2 deletions tests/unit/shell/util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
});
});
});

0 comments on commit a39e95d

Please sign in to comment.