Skip to content

Commit

Permalink
Allow pngquant's special exit code
Browse files Browse the repository at this point in the history
https://github.com/pornel/pngquant/blob/6827a99fb9447abb6e2b58ab00f098f5106f8f88/README.md#--quality-min-max

> If conversion results in quality below the `min` quality the image won't be saved (if outputting to stdin, 24-bit original will be output) and pngquant will exit with status code 99.

(Fix #21)
  • Loading branch information
shinnn committed Feb 19, 2016
1 parent 7b7b953 commit 213b093
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module.exports = function (opts) {
});

cp.on('close', function (code) {
if (code) {
if (code && code !== 99) {
err = new Error(err);
err.fileName = file.path;
cb(err);
Expand Down

1 comment on commit 213b093

@shinnn
Copy link
Contributor Author

@shinnn shinnn commented on 213b093 Jul 13, 2016

Choose a reason for hiding this comment

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

@kevva, does v5.0.0 handle this case correctly?


[EDIT 2017/01/12] Actually it's not correctly handled in v5.0.0. #32

Please sign in to comment.