mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-22 11:04:42 -07:00
Tighten bash shell option handling (#12532)
This commit is contained in:
@@ -186,7 +186,10 @@ describe('ShellExecutionService', () => {
|
||||
|
||||
expect(mockPtySpawn).toHaveBeenCalledWith(
|
||||
'bash',
|
||||
['-c', 'ls -l'],
|
||||
[
|
||||
'-c',
|
||||
'shopt -u promptvars nullglob extglob nocaseglob dotglob; ls -l',
|
||||
],
|
||||
expect.any(Object),
|
||||
);
|
||||
expect(result.exitCode).toBe(0);
|
||||
@@ -539,7 +542,10 @@ describe('ShellExecutionService', () => {
|
||||
|
||||
expect(mockPtySpawn).toHaveBeenCalledWith(
|
||||
'bash',
|
||||
['-c', 'ls "foo bar"'],
|
||||
[
|
||||
'-c',
|
||||
'shopt -u promptvars nullglob extglob nocaseglob dotglob; ls "foo bar"',
|
||||
],
|
||||
expect.any(Object),
|
||||
);
|
||||
});
|
||||
@@ -691,7 +697,10 @@ describe('ShellExecutionService child_process fallback', () => {
|
||||
|
||||
expect(mockCpSpawn).toHaveBeenCalledWith(
|
||||
'bash',
|
||||
['-c', 'ls -l'],
|
||||
[
|
||||
'-c',
|
||||
'shopt -u promptvars nullglob extglob nocaseglob dotglob; ls -l',
|
||||
],
|
||||
expect.objectContaining({ shell: false, detached: true }),
|
||||
);
|
||||
expect(result.exitCode).toBe(0);
|
||||
@@ -981,7 +990,10 @@ describe('ShellExecutionService child_process fallback', () => {
|
||||
|
||||
expect(mockCpSpawn).toHaveBeenCalledWith(
|
||||
'bash',
|
||||
['-c', 'ls "foo bar"'],
|
||||
[
|
||||
'-c',
|
||||
'shopt -u promptvars nullglob extglob nocaseglob dotglob; ls "foo bar"',
|
||||
],
|
||||
expect.objectContaining({
|
||||
shell: false,
|
||||
detached: true,
|
||||
|
||||
Reference in New Issue
Block a user