Exit process with code 1 if afterPack throws error (#2541)
This commit is contained in:
parent
67db697966
commit
7dcd41e598
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
|
@ -6,6 +6,7 @@
|
||||||
"source.fixAll.eslint": true
|
"source.fixAll.eslint": true
|
||||||
},
|
},
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
|
"appimage",
|
||||||
"automations",
|
"automations",
|
||||||
"Autoupgrade",
|
"Autoupgrade",
|
||||||
"browserview",
|
"browserview",
|
||||||
|
|
|
@ -37,6 +37,7 @@ function getAppFileName(context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.default = async function afterPack(context) {
|
exports.default = async function afterPack(context) {
|
||||||
|
try {
|
||||||
await flipFuses(
|
await flipFuses(
|
||||||
`${context.appOutDir}/${getAppFileName(context)}`, // Returns the path to the electron binary
|
`${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') {
|
if (context.electronPlatformName === 'linux') {
|
||||||
context.targets.forEach(fixSetuid(context));
|
context.targets.forEach(fixSetuid(context));
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('afterPack error: ', error);
|
||||||
|
// eslint-disable-next-line no-process-exit
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue