utils#system: improve verbose output.

This previously output the hilarious long and unnecessary LOAD_PATH.
This commit is contained in:
Mike McQuaid 2019-11-06 14:59:27 +00:00
parent e80008d6de
commit f3afedb4ff
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
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