JamieMason / ImageOptim-CLI

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

osascript: command not found #111

Closed kenetik closed 9 years ago

kenetik commented 9 years ago
[user@localhost Optimized]$ sudo imageOptim -d "/home/Optimized"
/usr/bin/imageOptimBashLib: line 447: osascript: command not found
/usr/bin/imageOptimBashLib: line 451: osascript: command not found
/usr/bin/imageOptim: line 64: osascript: command not found
/usr/bin/imageOptimBashLib: line 455: osascript: command not found
find: unknown predicate `-E'
sort: cannot read: /imageoptim-cli/index.txt: No such file or directory
Running ImageOptim...
/usr/bin/imageOptimBashLib: line 490: osascript: command not found
/usr/bin/imageOptimBashLib: line 492: osascript: command not found
Runtime error (func=(main), adr=9): Divide by zero
(standard_in) 2: syntax error
TOTAL was: 0kb now: 0kb saving: 0kb (%) quality: %
dkubb commented 8 years ago

This was probably caused by having GNU find in the $PATH ahead of the one that ships with OSX.

dreamalligator commented 6 years ago

I'm seeing the same thing. I installed via yarn, and am on Ubuntu Studio.

> $(yarn bin)/imageOptim --version
1.15.4

> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:    16.04
Codename:   xenial

> $(yarn bin)/imageOptim --directory path/to/images                                                                           
~/my/path/node_modules/.bin/imageOptimBashLib: line 461: osascript: command not found
~/my/path/node_modules/.bin/imageOptimBashLib: line 465: osascript: command not found
~/my/path/node_modules/.bin/imageOptim: line 74: osascript: command not found
~/my/path/node_modules/.bin/imageOptimBashLib: line 469: osascript: command not found
find: unknown predicate `-E'
kornelski commented 6 years ago

ImageOptim-CLI is a macOS app. It does not work on Ubuntu.