Exit process with code 1 if afterPack throws error (#2541)
This commit is contained in:
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,14 +37,20 @@ function getAppFileName(context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
exports.default = async function afterPack(context) {
|
exports.default = async function afterPack(context) {
|
||||||
await flipFuses(
|
try {
|
||||||
`${context.appOutDir}/${getAppFileName(context)}`, // Returns the path to the electron binary
|
await flipFuses(
|
||||||
{
|
`${context.appOutDir}/${getAppFileName(context)}`, // Returns the path to the electron binary
|
||||||
version: FuseVersion.V1,
|
{
|
||||||
[FuseV1Options.RunAsNode]: false, // Disables ELECTRON_RUN_AS_NODE
|
version: FuseVersion.V1,
|
||||||
});
|
[FuseV1Options.RunAsNode]: false, // Disables ELECTRON_RUN_AS_NODE
|
||||||
|
});
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user