Exit process with code 1 if afterPack throws error (#2541)

This commit is contained in:
Tasos Boulis 2023-02-06 16:36:35 +02:00 committed by GitHub
parent 67db697966
commit 7dcd41e598
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 8 deletions

View file

@ -6,6 +6,7 @@
"source.fixAll.eslint": true
},
"cSpell.words": [
"appimage",
"automations",
"Autoupgrade",
"browserview",

View file

@ -37,6 +37,7 @@ function getAppFileName(context) {
}
exports.default = async function afterPack(context) {
try {
await flipFuses(
`${context.appOutDir}/${getAppFileName(context)}`, // Returns the path to the electron binary
{
@ -47,4 +48,9 @@ exports.default = async function afterPack(context) {
if (context.electronPlatformName === 'linux') {
context.targets.forEach(fixSetuid(context));
}
} catch (error) {
console.error('afterPack error: ', error);
// eslint-disable-next-line no-process-exit
process.exit(1);
}
};