mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 12:04:56 -07:00
fix(core): Use shell for spawn on Windows (#9995)
This commit is contained in:
@@ -119,7 +119,24 @@ describe('ide-installer', () => {
|
||||
'google.gemini-cli-vscode-ide-companion',
|
||||
'--force',
|
||||
],
|
||||
{ stdio: 'pipe' },
|
||||
{ stdio: 'pipe', shell: false },
|
||||
);
|
||||
});
|
||||
|
||||
it('installs the extension using code cli on windows', async () => {
|
||||
const { installer } = setup({
|
||||
platform: 'win32',
|
||||
execSync: () => 'C:\\Program Files\\Microsoft VS Code\\bin\\code.cmd',
|
||||
});
|
||||
await installer.install();
|
||||
expect(child_process.spawnSync).toHaveBeenCalledWith(
|
||||
'C:\\Program Files\\Microsoft VS Code\\bin\\code.cmd',
|
||||
[
|
||||
'--install-extension',
|
||||
'google.gemini-cli-vscode-ide-companion',
|
||||
'--force',
|
||||
],
|
||||
{ stdio: 'pipe', shell: true },
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ class VsCodeInstaller implements IdeInstaller {
|
||||
'google.gemini-cli-vscode-ide-companion',
|
||||
'--force',
|
||||
],
|
||||
{ stdio: 'pipe' },
|
||||
{ stdio: 'pipe', shell: this.platform === 'win32' },
|
||||
);
|
||||
|
||||
if (result.status !== 0) {
|
||||
|
||||
Reference in New Issue
Block a user