fix: install-deps did not throw on non 0 exit code (#12375)
This commit is contained in:
parent
3c2bca2768
commit
41e9b36f63
|
|
@ -78,8 +78,8 @@ export async function installDependenciesLinux(targets: Set<DependencyGroup>, dr
|
|||
if (elevatedPermissions)
|
||||
console.log('Switching to root user to install dependencies...'); // eslint-disable-line no-console
|
||||
const child = childProcess.spawn(command, args, { stdio: 'inherit' });
|
||||
await new Promise((resolve, reject) => {
|
||||
child.on('exit', resolve);
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
child.on('exit', (code: number) => code === 0 ? resolve() : reject(new Error(`Installation process exited with code: ${code}`)));
|
||||
child.on('error', reject);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue