From 049b56a4e23367a2d9dc4bd68490ca9f6d6d2263 Mon Sep 17 00:00:00 2001 From: Ivan Kuchin Date: Wed, 16 Jan 2013 23:54:56 +0100 Subject: [PATCH] -s option of which command is custom and should not be used, closes #7 --- lib/image_optim.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/image_optim.rb b/lib/image_optim.rb index ca16470f..21a2c45c 100644 --- a/lib/image_optim.rb +++ b/lib/image_optim.rb @@ -210,7 +210,7 @@ def apply_threading(array) # Check if bin can be accessed def bin_accessible?(bin) - system(*%W[which -s #{bin}]) + `which #{bin.to_s.shellescape}` != '' end # http://stackoverflow.com/questions/891537/ruby-detect-number-of-cpus-installed