(script: string)
| 1035 | } |
| 1036 | |
| 1037 | async function runPowerShellScript(script: string): Promise<void> { |
| 1038 | const powershell = process.platform === 'win32' ? 'powershell.exe' : 'powershell'; |
| 1039 | const encoded = Buffer.from(script, 'utf16le').toString('base64'); |
| 1040 | await runCommand(powershell, ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-EncodedCommand', encoded]); |
| 1041 | } |
| 1042 | |
| 1043 | async function commandExists(command: string): Promise<boolean> { |
| 1044 | return await new Promise<boolean>((resolve) => { |
no test coverage detected