Skip to content

Commit 5c2303a

Browse files
author
Christopher Willis-Ford
committed
bubble errors out from electron-builder-wrapper
1 parent ccaca91 commit 5c2303a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

scripts/electron-builder-wrapper.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,20 @@ const runBuilder = function (targetGroup) {
5252
const platformFlag = getPlatformFlag();
5353
const command = `electron-builder ${platformFlag} ${targetGroup}`;
5454
console.log(`running: ${command}`);
55-
spawnSync(command, {
55+
const result = spawnSync(command, {
5656
env: childEnvironment,
5757
shell: true,
5858
stdio: 'inherit'
5959
});
60+
if (result.error) {
61+
throw result.error;
62+
}
63+
if (result.signal) {
64+
throw new Error(`Child process terminated due to signal ${result.signal}`);
65+
}
66+
if (result.status) {
67+
throw new Error(`Child process returned status code ${result.status}`);
68+
}
6069
};
6170

6271
/**

0 commit comments

Comments
 (0)