Permalink
Browse files

Improve Imagemagick code from #1533 to check on all operating systems

  • Loading branch information...
radar committed May 22, 2012
1 parent 1fcdcbb commit a6deb62753b8c5af89991c3e441a7468ceb6b425
Showing with 8 additions and 10 deletions.
  1. +8 −10 cmd/lib/spree_cmd/installer.rb
@@ -183,17 +183,15 @@ def windows?
end
def image_magick_installed?
if mac? || linux?
begin
%x(identify -version)
rescue
end
$?.success?
elsif windows?
# not sure how to check on windows so assume installed
true
begin
%x(identify -version)
# The Errno::ENOENT exception is raised on all OSes when it cannot find a command
rescue Errno::ENOENT
return false
rescue # Silence any other exception
end
# If program *did* execute, check to see if it executed successfully
$?.success?
end
end
end

0 comments on commit a6deb62

Please sign in to comment.