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