Skip to content
Permalink
Browse files

fix(packager): fix custom afterCopy, afterPrune not being included

As per MDN -->
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat the
concat method does not change existing arrays but returns a new one.  We can use the spread operator
and push to achieve what we want
  • Loading branch information
MarshallOfSound committed Nov 24, 2017
1 parent 7d22d16 commit c9e23e38cb87ce6ea20e827081e053db7e93785b
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/api/package.js
@@ -115,13 +115,13 @@ export default async (providedOptions = {}) => {
done();
});

afterCopyHooks.concat(resolveHooks(forgeConfig.electronPackagerConfig.afterCopy, dir));
afterCopyHooks.push(...resolveHooks(forgeConfig.electronPackagerConfig.afterCopy, dir));

const afterPruneHooks = [];

if (pruneEnabled) {
afterPruneHooks.push(rebuildHookFn);
afterPruneHooks.concat(resolveHooks(forgeConfig.electronPackagerConfig.afterPrune, dir));
afterPruneHooks.push(...resolveHooks(forgeConfig.electronPackagerConfig.afterPrune, dir));
}

const packageOpts = Object.assign({

0 comments on commit c9e23e3

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