Skip to content

Commit

Permalink
Try afterprune workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvNC committed Jul 20, 2023
1 parent 2d9e918 commit d75bf98
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions forge.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
const fs = require('fs');
const path = require('path');

module.exports = {
packagerConfig: {
asar: true,
Expand Down Expand Up @@ -49,4 +52,14 @@ module.exports = {
},
},
],
hooks: {
// Fix sqlite links out of the package https://www.update.rocks/blog/fixing-the-python3/
packageAfterPrune: async (forgeConfig, buildPath, electronVersion, platform, arch) => {
if (platform === 'darwin' || platform === 'linux') {
console.log('We need to remove the problematic link file on macOS/Linux');
console.log(`Build path ${buildPath}`);
fs.unlinkSync(path.join(buildPath, 'node_modules/sqlite3/build/node_gyp_bins/python3'));
}
},
},
};

0 comments on commit d75bf98

Please sign in to comment.