allbitsnbytes / gulp-imageoptim

Gulp plugin to optimize images using ImageOptim
Other
22 stars 2 forks source link

Fails when file has brackets #1

Closed lukewhitehouse closed 9 years ago

lukewhitehouse commented 9 years ago

Hey,

It seems that the script fails to work when the image in question has brackets in the name. Here's the log:

Error: Command failed: /bin/sh -c find /Applications/MAMP/htdocs/frontend-framework/assets/dist/img/imgOptim-Screen Shot 2015-05-27 at 14.22.38 (2).png | sh ./node_modules/gulp-imageoptim/node_modules/.bin/imageOptim -a -c -q | grep TOTAL
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `find /Applications/MAMP/htdocs/frontend-framework/assets/dist/img/imgOptim-Screen Shot 2015-05-27 at 14.22.38 (2).png | sh ./node_modules/gulp-imageoptim/node_modules/.bin/imageOptim -a -c -q | grep TOTAL '

As soon as I took out the brackets it worked. While I appreciate that you shouldn't have brackets or spaces (etc) in your file names, it could still do with being fixed?

allbitsnbytes commented 9 years ago

Thanks for reporting this issue. It's been fixed.

lukewhitehouse commented 9 years ago

Awesome! @allbitsnbytes