diff options
author | Go MAEDA <maeda@farend.jp> | 2019-05-05 00:44:32 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-05-05 00:44:32 +0000 |
commit | a81749fe66eb416c35f58ef91524be95b7cb9411 (patch) | |
tree | 1e48fe9d44ecc0f8716147b862a567ed912b8040 /lib/redmine | |
parent | f28ad8e25f57ad61ea5c0900ac00753f701ac444 (diff) | |
download | redmine-a81749fe66eb416c35f58ef91524be95b7cb9411.tar.gz redmine-a81749fe66eb416c35f58ef91524be95b7cb9411.zip |
Don't output ImageMagick version information to stdout (#31125).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@18126 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine')
-rw-r--r-- | lib/redmine/thumbnail.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/redmine/thumbnail.rb b/lib/redmine/thumbnail.rb index a46a09ee1..31ac62272 100644 --- a/lib/redmine/thumbnail.rb +++ b/lib/redmine/thumbnail.rb @@ -51,7 +51,12 @@ module Redmine def self.convert_available? return @convert_available if defined?(@convert_available) - @convert_available = system("#{shell_quote CONVERT_BIN} -version") rescue false + begin + `#{shell_quote CONVERT_BIN} -version` + @convert_available = $?.success? + rescue + @convert_available = false + end logger.warn("Imagemagick's convert binary (#{CONVERT_BIN}) not available") unless @convert_available @convert_available end |