Merge pull request #6705 from MikeMcQuaid/system-improve-verbose-output

utils#system: improve verbose output.
This commit is contained in:
Mike McQuaid 2019-11-06 17:11:39 +00:00 committed by GitHub
commit 4873c490e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -26,7 +26,7 @@ module Homebrew
ruby_args.parse
begin
safe_system ENV["HOMEBREW_RUBY_PATH"],
safe_system RUBY_PATH,
"-I", $LOAD_PATH.join(File::PATH_SEPARATOR),
"-rglobal", "-rdev-cmd/irb",
*ARGV

View File

@ -35,7 +35,10 @@ module Homebrew
end
def system(cmd, *args, **options)
puts "#{cmd} #{args * " "}" if ARGV.verbose?
if ARGV.verbose?
puts "#{cmd} #{args * " "}".gsub(RUBY_PATH, "ruby")
.gsub($LOAD_PATH.join(File::PATH_SEPARATOR).to_s, "$LOAD_PATH")
end
_system(cmd, *args, **options)
end