Skip to content
Permalink
Browse files

fix(packager): move the rebuild hook to after pruning finishes

Should fix weirdness with node-pre-gyp native modules and yarn

ISSUES CLOSED: #330
  • Loading branch information
malept committed Sep 24, 2017
1 parent e847a78 commit cce9db42d40b4dabeba8809e6ce52128fc754f2f
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/api/package.js
@@ -94,10 +94,6 @@ export default async (providedOptions = {}) => {
}, async (...args) => {
prepareSpinner.succeed();
await packagerCompileHook(dir, ...args);
}, async (buildPath, electronVersion, pPlatform, pArch, done) => {
await rebuildHook(buildPath, electronVersion, pPlatform, pArch);
packagerSpinner = ora('Packaging Application').start();
done();
}, async (buildPath, electronVersion, pPlatform, pArch, done) => {
const copiedPackageJSON = await readPackageJSON(buildPath);
if (copiedPackageJSON.config && copiedPackageJSON.config.forge) {
@@ -107,7 +103,11 @@ export default async (providedOptions = {}) => {
done();
}].concat(resolveHooks(forgeConfig.electronPackagerConfig.afterCopy, dir)),
afterExtract: resolveHooks(forgeConfig.electronPackagerConfig.afterExtract, dir),
afterPrune: resolveHooks(forgeConfig.electronPackagerConfig.afterPrune, dir),
afterPrune: [async (buildPath, electronVersion, pPlatform, pArch, done) => {
await rebuildHook(buildPath, electronVersion, pPlatform, pArch);
packagerSpinner = ora('Packaging Application').start();
done();
}].concat(resolveHooks(forgeConfig.electronPackagerConfig.afterPrune, dir)),
dir,
arch,
platform,

0 comments on commit cce9db4

Please sign in to comment.
You can’t perform that action at this time.