Description
In packages/core/src/services/shellExecutionService.windows.integration.test.ts, the real-shell integration tests are guarded solely with:
`ts
describe.skipIf(!isWindows)
``
However, on standard Windows machines where PowerShell 7 (pwsh.exe) is not installed, getShellConfiguration() falls back to Windows PowerShell 5.1 (powershell.exe).
Because Windows PowerShell 5.1 mangles inline double quotes passed to native executables, 4 out of the 5 tests in the suite fail with exit code 1 (AssertionError: expected 1 to be +0).
As the test suite's docstring explicitly notes:
"These tests exercise the full pipeline end-to-end. They pass when gemini-cli selects pwsh.exe from PATH; they fail when the pipeline routes through Windows PowerShell 5.1."
Steps to Reproduce
- On a Windows machine where PowerShell 7 (pwsh.exe) is not installed on PATH.
- Run:
bash npm test -w @google/gemini-cli-core -- src/services/shellExecutionService.windows.integration.test.ts
- Observe 4 failing tests.
Proposed Solution
Guard the test suite with: ts const hasPwsh = isWindows && Boolean(resolveExecutable('pwsh.exe')); describe.skipIf(!hasPwsh)(...);
This ensures the suite cleanly skips on Windows installations lacking pwsh.exe, while still running in environments that have PowerShell 7 (such as GitHub Actions CI runners).
Description
In
packages/core/src/services/shellExecutionService.windows.integration.test.ts, the real-shell integration tests are guarded solely with:`ts
describe.skipIf(!isWindows)
``
However, on standard Windows machines where PowerShell 7 (pwsh.exe) is not installed, getShellConfiguration() falls back to Windows PowerShell 5.1 (powershell.exe).
Because Windows PowerShell 5.1 mangles inline double quotes passed to native executables, 4 out of the 5 tests in the suite fail with exit code 1 (AssertionError: expected 1 to be +0).
As the test suite's docstring explicitly notes:
Steps to Reproduce
bash npm test -w @google/gemini-cli-core -- src/services/shellExecutionService.windows.integration.test.tsProposed Solution
Guard the test suite with:
ts const hasPwsh = isWindows && Boolean(resolveExecutable('pwsh.exe')); describe.skipIf(!hasPwsh)(...);This ensures the suite cleanly skips on Windows installations lacking pwsh.exe, while still running in environments that have PowerShell 7 (such as GitHub Actions CI runners).