Add a comment to explain where.exe

This commit is contained in:
Alexander Farber 2026-02-08 16:10:48 +01:00
parent 396d53367b
commit 5ec3b755e2
No known key found for this signature in database

View file

@ -70,6 +70,8 @@ if (!geminiSandbox) {
geminiSandbox = (geminiSandbox || '').toLowerCase();
const commandExists = (cmd) => {
// 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' });