lib/mini_magick/shell.rb in mini_magick-4.12.0 vs lib/mini_magick/shell.rb in mini_magick-4.13.0

- old
+ new

@@ -12,24 +12,24 @@ def run(command, options = {}) stdout, stderr, status = execute(command, stdin: options[:stdin]) if status != 0 && options.fetch(:whiny, MiniMagick.whiny) - fail MiniMagick::Error, "`#{command.join(" ")}` failed with status: #{status} and error:\n#{stderr}" + fail MiniMagick::Error, "`#{command.join(" ")}` failed with status: #{status.inspect} and error:\n#{stderr}" end - $stderr.print(stderr) unless options[:stderr] == false + $stderr.print(stderr) unless options[:stderr] == false || stderr.strip == %(WARNING: The convert command is deprecated in IMv7, use "magick") [stdout, stderr, status] end def execute(command, options = {}) stdout, stderr, status = log(command.join(" ")) do send("execute_#{MiniMagick.shell_api.tr("-", "_")}", command, options) end - [stdout, stderr, status.exitstatus] + [stdout, stderr, status&.exitstatus] rescue Errno::ENOENT, IOError ["", "executable not found: \"#{command.first}\"", 127] end private