diff --git a/lib/image_optim/worker.rb b/lib/image_optim/worker.rb index ea650fe2..7f567834 100644 --- a/lib/image_optim/worker.rb +++ b/lib/image_optim/worker.rb @@ -35,7 +35,7 @@ def underscored_name def initialize(options = {}) get_option!(options, :bin, default_bin) parse_options(options) - raise "`#{bin}` not found" unless Util.run('which', bin) + raise "`#{bin}` not found" if `which #{bin.to_s.shellescape}`.empty? assert_options_empty!(options) end