Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command failed with exit code when using ImageAlpha (works great without it) #182

Closed
rc042 opened this issue Oct 27, 2019 · 5 comments
Closed

Comments

@rc042
Copy link

rc042 commented Oct 27, 2019

Hi!

I meet an issue and I don't know how to solve it...

Steps To Reproduce The Error

Try to process a file or multiple file, for example:

$ imageoptim -a EXP_IMG_893010262019.png

$ imageoptim -a '**/*.png'

Expected Behaviour

Actual Behaviour

I've got an error (see below).

Output error looks like:

$ imageoptim -a EXP_IMG_893010262019.png
i Running ImageAlpha...
! Command failed with exit code 98 (Unknown system error -98): /Applications/ImageAlpha.app/Contents/MacOS/pngquant --ext=.png --force --skip-if-larger --speed=1 --quality=65-80 256 -- /var/folders/k6/78rvflqd1fd8zyttzqy7zkqm0000gn/T/imageoptim-cli/EXP_IMG_893010262019.png

! Please raise an issue at https://github.com/JamieMason/ImageOptim-CLI/issues

    Error: Command failed with exit code 98 (Unknown system error -98): /Applications/ImageAlpha.app/Contents/MacOS/pngquant --ext=.png --force --skip-if-larger --speed=1 --quality=65-80 256 -- /var/folders/k6/78rvflqd1fd8zyttzqy7zkqm0000gn/T/imageoptim-cli/EXP_IMG_893010262019.png
        at Object.exports.pngquant (/usr/local/Cellar/imageoptim-cli/3.0.0/libexec/lib/node_modules/imageoptim-cli/dist/imageoptim:475:19)
        at process._tickCallback (internal/process/next_tick.js:68:7)

Version Numbers or N/A

  • macOS: 10.14.6
  • /Applications/ImageOptim.app: 3.0.0
  • /Applications/ImageAlpha.app: 1.5.1
  • /Applications/JPEGmini.app: N/A (not used)

Help Needed

I tried to execute pngquant and it eems to work without problem:

$ /Applications/ImageAlpha.app/Contents/MacOS/pngquant --ext=.png --force --skip-if-larger --speed=1 --quality=65-80 256 -- /var/folders/k6/78rvflqd1fd8zyttzqy7zkqm0000gn/T/imageoptim-cli/EXP_IMG_893010262019.png

Other thing, it works fine without option:

$ imageoptim '**/*.png'
i Running ImageOptim...
✓ EXP_IMG_893010262019.png was: 2.99MB now: 1.18MB saving: 1.81MB (60.53%)
✓ EXP_IMG_893310262019.png was: 6.24MB now: 5.85MB saving: 390kB (6.25%)
[...]
✓ TOTAL was: 251MB now: 133MB saving: 118MB (47.05%)
✓ Finished

Thanks!

@JamieMason
Copy link
Owner

As far as I can tell from this search: error code 98 refers to an image which is too large for pngquant to handle, but it looks like EXP_IMG_893010262019.png was 2.99MB in size which I don't expect to be a problem.

I will be honest with you, I'm unable to reproduce this and don't have ideas for a fix at the moment.

@kornelski
Copy link

The code 98 is a normal behavior. It's returned when --skip-if-larger worked as advertised.

@JamieMason
Copy link
Owner

Thanks @kornelski. I am unblocked and can take a look at how this CLI is handling error codes.

@JamieMason
Copy link
Owner

Fix released in 3.0.2

@rc042
Copy link
Author

rc042 commented Nov 13, 2019

Hi, a little word to say thank you! It works fine with this version :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants