| 70 | geminiSandbox = (geminiSandbox || '').toLowerCase(); |
| 71 | |
| 72 | const commandExists = (cmd) => { |
| 73 | const checkCommand = os.platform() === 'win32' ? 'where' : 'command -v'; |
| 74 | try { |
| 75 | execSync(`${checkCommand} ${cmd}`, { stdio: 'ignore' }); |
| 76 | return true; |
| 77 | } catch { |
| 78 | if (os.platform() === 'win32') { |
| 79 | try { |
| 80 | execSync(`${checkCommand} ${cmd}.exe`, { stdio: 'ignore' }); |
| 81 | return true; |
| 82 | } catch { |
| 83 | return false; |
| 84 | } |
| 85 | } |
| 86 | return false; |
| 87 | } |
| 88 | }; |
| 89 | |
| 90 | let command = ''; |
| 91 | if (['1', 'true'].includes(geminiSandbox)) { |