(script)
| 19 | } |
| 20 | |
| 21 | function runPowerShell(script) { |
| 22 | const result = spawnSync( |
| 23 | 'powershell', |
| 24 | ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-Command', script], |
| 25 | { stdio: 'inherit' } |
| 26 | ); |
| 27 | if (result.error) { |
| 28 | console.error(result.error); |
| 29 | process.exit(1); |
| 30 | } |
| 31 | if (result.status !== 0) { |
| 32 | process.exit(result.status ?? 1); |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | function main() { |
| 37 | if (process.platform !== 'win32') { |