Pass args.verbose? to BuildError#dump.

This commit is contained in:
Markus Reiter 2020-08-02 02:52:24 +02:00
parent 57fa48b758
commit 7926f7fc82
3 changed files with 7 additions and 6 deletions

View File

@ -59,7 +59,8 @@ begin
ARGV.delete_at(help_cmd_index) if help_cmd_index
Homebrew.args = Homebrew::CLI::Parser.new.parse(ARGV.dup.freeze, ignore_invalid_options: true)
args = Homebrew::CLI::Parser.new.parse(ARGV.dup.freeze, ignore_invalid_options: true)
Homebrew.args = args
path = PATH.new(ENV["PATH"])
homebrew_path = PATH.new(ENV["HOMEBREW_PATH"])
@ -148,7 +149,7 @@ rescue Interrupt
exit 130
rescue BuildError => e
Utils::Analytics.report_build_error(e)
e.dump
e.dump(verbose: args.verbose?)
if e.formula.head? || e.formula.deprecated? || e.formula.disabled?
$stderr.puts <<~EOS

View File

@ -356,10 +356,10 @@ class BuildError < RuntimeError
[]
end
def dump
def dump(verbose: false)
puts
if Homebrew.args.verbose?
if verbose
require "system_config"
require "build_environment"

View File

@ -102,7 +102,7 @@ module Homebrew
rescue CannotInstallFormulaError => e
ofail e
rescue BuildError => e
e.dump
e.dump(verbose: args.verbose?)
puts
Homebrew.failed = true
rescue DownloadError => e
@ -225,7 +225,7 @@ module Homebrew
rescue CannotInstallFormulaError => e
ofail e
rescue BuildError => e
e.dump
e.dump(verbose: args.verbose?)
puts
Homebrew.failed = true
rescue DownloadError => e