diff options
| author | Mike McQuaid | 2016-11-05 15:39:25 -0400 |
|---|---|---|
| committer | Mike McQuaid | 2016-11-05 15:39:25 -0400 |
| commit | a1e798d964599230800a12172aec0d70299937cd (patch) | |
| tree | 6b057a49c1e7f6ca5958272a60d61d03c1b3fa2f /Library/Homebrew/exceptions.rb | |
| parent | c7de142800e2bc8fe169aa8bf53de88b65d5784e (diff) | |
| download | brew-a1e798d964599230800a12172aec0d70299937cd.tar.bz2 | |
exceptions: reorder output based on importance.
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
| -rw-r--r-- | Library/Homebrew/exceptions.rb | 51 |
1 files changed, 35 insertions, 16 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index 834ef91ac..3d9b24034 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -327,22 +327,9 @@ class BuildError < RuntimeError end def dump - if !ARGV.verbose? - puts - puts Formatter.error(Formatter.url(OS::ISSUES_URL), label: "READ THIS") - if formula.tap - case formula.tap.name - when "homebrew/boneyard" - puts "#{formula} was moved to homebrew-boneyard because it has unfixable issues." - puts "Please do not file any issues about this. Sorry!" - else - if issues_url = formula.tap.issues_url - puts "If reporting this issue please do so at (not Homebrew/brew):" - puts " #{Formatter.url(issues_url)}" - end - end - end - else + puts + + if ARGV.verbose? require "system_config" require "build_environment" @@ -360,7 +347,37 @@ class BuildError < RuntimeError puts logs.map { |fn| " #{fn}" }.join("\n") end end + + if formula.tap && formula.tap.name == "homebrew/boneyard" + onoe <<-EOS.undent + #{formula} was moved to homebrew-boneyard because it has unfixable issues. + Please do not file any issues about this. Sorry! + EOS + return + end + + if formula.tap + if formula.tap.official? + puts Formatter.error(Formatter.url(OS::ISSUES_URL), label: "READ THIS") + elsif issues_url = formula.tap.issues_url + puts <<-EOS.undent + If reporting this issue please do so at (not Homebrew/brew or Homebrew/core): + #{Formatter.url(issues_url)} + EOS + else + puts <<-EOS.undent + If reporting this issue please do so to (not Homebrew/brew or Homebrew/core): + #{formula.tap} + EOS + end + else + puts <<-EOS.undent + Do not report this issue to Homebrew/brew or Homebrew/core! + EOS + end + puts + if issues && !issues.empty? puts "These open issues may also help:" puts issues.map { |i| "#{i["title"]} #{i["html_url"]}" }.join("\n") @@ -369,7 +386,9 @@ class BuildError < RuntimeError require "diagnostic" checks = Homebrew::Diagnostic::Checks.new checks.build_error_checks.each do |check| + out = checks.send(check) next if out.nil? + puts ofail out end end |
