build(postinstall): fail loud when electron name patch errors (P3-28)
This commit is contained in:
1 parent
08968e8331
commit
c93b28925b
1 file changed
+4
-3
@@ -22,12 +22,13 @@ const result = spawnSync("bash", [patchScriptPath], {
|
||||
});
|
||||
|
||||
if (result.error) {
|
||||
console.warn(`[postinstall] Electron name patch failed: ${result.error.message}`);
|
||||
process.exit(0);
|
||||
console.error(`[postinstall] Electron name patch failed: ${result.error.message}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if ((result.status ?? 0) !== 0) {
|
||||
console.warn(`[postinstall] Electron name patch exited with status ${result.status}. Continuing install.`);
|
||||
console.error(`[postinstall] Electron name patch exited with status ${result.status}.`);
|
||||
process.exit(result.status ?? 1);
|
||||
}
|
||||
|
||||
process.exit(0);
|
||||
Reference in new issue
Block a user