Merge pull request #16163 from apainintheneck/system-verbose-print-to-stderr-on-request

utils: Homebrew.system respect stderr
This commit is contained in:
Mike McQuaid 2023-10-30 14:38:34 +00:00 committed by GitHub
commit 98e06d98b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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