Merge pull request #1604 from afarber/1399-podman-windows
Some checks are pending
Qwen Code CI / CodeQL (push) Waiting to run
Qwen Code CI / Lint (push) Waiting to run
Qwen Code CI / Test (push) Blocked by required conditions
Qwen Code CI / Test-1 (push) Blocked by required conditions
Qwen Code CI / Test-2 (push) Blocked by required conditions
Qwen Code CI / Test-3 (push) Blocked by required conditions
Qwen Code CI / Test-4 (push) Blocked by required conditions
Qwen Code CI / Test-5 (push) Blocked by required conditions
Qwen Code CI / Test-6 (push) Blocked by required conditions
Qwen Code CI / Test-7 (push) Blocked by required conditions
Qwen Code CI / Test-8 (push) Blocked by required conditions
Qwen Code CI / Post Coverage Comment (push) Blocked by required conditions
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none (push) Waiting to run
E2E Tests / E2E Test - macOS (push) Waiting to run

fix(cli): use PowerShell Get-Command for Windows sandbox detection
This commit is contained in:
DennisYu07 2026-02-09 18:27:27 -08:00 committed by GitHub
commit abd630e815
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -70,12 +70,14 @@ if (!geminiSandbox) {
geminiSandbox = (geminiSandbox || '').toLowerCase();
const commandExists = (cmd) => {
const checkCommand = os.platform() === 'win32' ? 'where' : 'command -v';
// Use 'where.exe' (not 'where') on Windows because PowerShell aliases
// 'where' to 'Where-Object', which breaks command detection.
const checkCommand = os.platform() === 'win32' ? 'where.exe' : 'command -v';
try {
execSync(`${checkCommand} ${cmd}`, { stdio: 'ignore' });
return true;
} catch {
if (os.platform() === 'win32') {
if (os.platform() === 'win32' && !cmd.endsWith('.exe')) {
try {
execSync(`${checkCommand} ${cmd}.exe`, { stdio: 'ignore' });
return true;