Skip to content

Commit

Permalink
fix: update post install script instead of overwriting it. closes #97
Browse files Browse the repository at this point in the history
  • Loading branch information
bennymeg committed Nov 22, 2021
1 parent 955647e commit de69c98
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/schematics/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ function addScripts(): Rule {
return updateJsonInTree('package.json', json => {
json.scripts = json.scripts || {};

json.scripts["postinstall"] = "exitzero electron-builder install-app-deps";
const postinstall = json.scripts["postinstall"];
json.scripts["postinstall"] = (postinstall && postinstall !== '') ?
`${postinstall} && exitzero electron-builder install-app-deps` :
"exitzero electron-builder install-app-deps";

return json;
});
Expand Down

0 comments on commit de69c98

Please sign in to comment.