Skip to content

Commit

Permalink
Fail the postinstall script if compiling fails (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Jones authored and sindresorhus committed Mar 15, 2018
1 parent 172fd0e commit a518db6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ bin.run(['--version'], err => {
.catch(err => {
err.message = `pngquant failed to build, make sure that ${libpng} is installed`;
logalot.error(err.stack);

// eslint-disable-next-line unicorn/no-process-exit
process.exit(1);
});
}

Expand Down

3 comments on commit a518db6

@abetwothree
Copy link

@abetwothree abetwothree commented on a518db6 Mar 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like somewhere on my dependencies stack, this package is used. And now this process.exit() is keeping me from being able to deploy.

Any suggestions?

@szborows
Copy link

@szborows szborows commented on a518db6 Mar 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're also having issue after this was introduced... (because we use image-webpack-loader)

our initial workaround for this is to prepare package-lock.json file

@musicin3d
Copy link

@musicin3d musicin3d commented on a518db6 Apr 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also unable to install. No error message is printed. This is being discussed at #78 (comment)

Please sign in to comment.