bubble errors out from electron-builder-wrapper

This commit is contained in:
Christopher Willis-Ford 2020-01-14 14:10:22 -08:00
parent ccaca91bea
commit 5c2303a9b5

View file

@ -52,11 +52,20 @@ const runBuilder = function (targetGroup) {
const platformFlag = getPlatformFlag(); const platformFlag = getPlatformFlag();
const command = `electron-builder ${platformFlag} ${targetGroup}`; const command = `electron-builder ${platformFlag} ${targetGroup}`;
console.log(`running: ${command}`); console.log(`running: ${command}`);
spawnSync(command, { const result = spawnSync(command, {
env: childEnvironment, env: childEnvironment,
shell: true, shell: true,
stdio: 'inherit' stdio: 'inherit'
}); });
if (result.error) {
throw result.error;
}
if (result.signal) {
throw new Error(`Child process terminated due to signal ${result.signal}`);
}
if (result.status) {
throw new Error(`Child process returned status code ${result.status}`);
}
}; };
/** /**