diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index e2958fb775..74b1f83c24 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -43,8 +43,9 @@ module Homebrew def self.system(cmd, *args, **options) if verbose? - puts "#{cmd} #{args * " "}".gsub(RUBY_PATH, "ruby") - .gsub($LOAD_PATH.join(File::PATH_SEPARATOR).to_s, "$LOAD_PATH") + out = (options[:out] == :err) ? $stderr : $stdout + out.puts "#{cmd} #{args * " "}".gsub(RUBY_PATH, "ruby") + .gsub($LOAD_PATH.join(File::PATH_SEPARATOR).to_s, "$LOAD_PATH") end _system(cmd, *args, **options) end