JamieMason / ImageOptim-CLI

Make optimisation of images part of your automated build process
https://foldleft.io/image-tools
MIT License
3.45k stars 125 forks source link

Command failed #170

Closed aforeman closed 5 years ago

aforeman commented 5 years ago

Types of Changes

What types of changes does your issue require? Put an x in all the boxes that apply:

Description

ImageOptim-CLI crashes when attempting to convert PNGs.

i Running ImageOptim... ! Command failed: /Applications/ImageOptim.app/Contents/MacOS/ImageOptim /var/folders/kx/vn33mmld5bn_hf56pzh83zy80000gn/T/imageoptim-cli

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

Error: Command failed: /Applications/ImageOptim.app/Contents/MacOS/ImageOptim /var/folders/kx/vn33mmld5bn_hf56pzh83zy80000gn/T/imageoptim-cli

    at makeError (/usr/local/Cellar/imageoptim-cli/2.0.4/libexec/dist/imageoptim:10248:9)
    at Promise.all.then.arr (/usr/local/Cellar/imageoptim-cli/2.0.4/libexec/dist/imageoptim:10352:16)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Convert PNGs.

Related Issue

Suggested Solution

glosik commented 5 years ago

Getting similar (Mojave?):

i Running ImageOptim... ! spawn /Applications/ImageOptim.app/Contents/MacOS/ImageOptim ENOENT Error: spawn /Applications/ImageOptim.app/Contents/MacOS/ImageOptim ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:217:19) at onErrorNT (internal/child_process.js:394:16) at process._tickCallback (internal/process/next_tick.js:174:19)

JamieMason commented 5 years ago

@glosik it looks like you have not installed https://imageoptim.com/mac?

@aforeman I've not been able to reproduce this and optimised a PNG just now without issue. Please could you add more information, such as what options you passed when running imageoptim cli.

$ imageoptim --imagealpha '~/Desktop'
i Running ImageAlpha...
i Running ImageOptim...
✓ /Users/foldleft/Desktop/Screen Shot 2018-12-23 at 17.23.16.png was: 123kB now: 37.1kB saving: 85.5kB (69.77%)
✓ TOTAL was: 123kB now: 37.1kB saving: 85.5kB (69.77%)
✓ Finished