fix: PowerShell execution policies (#9885)
This commit is contained in:
parent
227e3da62f
commit
bff84c5391
|
|
@ -40,7 +40,7 @@ export type DependencyGroup = 'chromium' | 'firefox' | 'webkit' | 'tools';
|
|||
|
||||
export async function installDependenciesWindows(targets: Set<DependencyGroup>) {
|
||||
if (targets.has('chromium')) {
|
||||
const { code } = await utils.spawnAsync('powershell.exe', ['-File', path.join(BIN_DIRECTORY, 'install_media_pack.ps1')], { cwd: BIN_DIRECTORY, stdio: 'inherit' });
|
||||
const { code } = await utils.spawnAsync('powershell.exe', ['-ExecutionPolicy', 'Bypass', '-File', path.join(BIN_DIRECTORY, 'install_media_pack.ps1')], { cwd: BIN_DIRECTORY, stdio: 'inherit' });
|
||||
if (code !== 0)
|
||||
throw new Error('Failed to install windows dependencies!');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -625,7 +625,7 @@ export class Registry {
|
|||
const isPowerShell = scriptName.endsWith('.ps1');
|
||||
const shell = isPowerShell ? 'powershell.exe' : 'bash';
|
||||
const args = [
|
||||
...(isPowerShell ? ['-File'] : []),
|
||||
...(isPowerShell ? ['-ExecutionPolicy', 'Bypass', '-File'] : []),
|
||||
path.join(BIN_PATH, scriptName),
|
||||
...scriptArgs
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in a new issue