exceptions: reorder output based on importance.
This commit is contained in:
parent
c7de142800
commit
a1e798d964
@ -327,22 +327,9 @@ class BuildError < RuntimeError
|
|||||||
end
|
end
|
||||||
|
|
||||||
def dump
|
def dump
|
||||||
if !ARGV.verbose?
|
puts
|
||||||
puts
|
|
||||||
puts Formatter.error(Formatter.url(OS::ISSUES_URL), label: "READ THIS")
|
if ARGV.verbose?
|
||||||
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
|
|
||||||
require "system_config"
|
require "system_config"
|
||||||
require "build_environment"
|
require "build_environment"
|
||||||
|
|
||||||
@ -360,7 +347,37 @@ class BuildError < RuntimeError
|
|||||||
puts logs.map { |fn| " #{fn}" }.join("\n")
|
puts logs.map { |fn| " #{fn}" }.join("\n")
|
||||||
end
|
end
|
||||||
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
|
puts
|
||||||
|
|
||||||
if issues && !issues.empty?
|
if issues && !issues.empty?
|
||||||
puts "These open issues may also help:"
|
puts "These open issues may also help:"
|
||||||
puts issues.map { |i| "#{i["title"]} #{i["html_url"]}" }.join("\n")
|
puts issues.map { |i| "#{i["title"]} #{i["html_url"]}" }.join("\n")
|
||||||
@ -369,7 +386,9 @@ class BuildError < RuntimeError
|
|||||||
require "diagnostic"
|
require "diagnostic"
|
||||||
checks = Homebrew::Diagnostic::Checks.new
|
checks = Homebrew::Diagnostic::Checks.new
|
||||||
checks.build_error_checks.each do |check|
|
checks.build_error_checks.each do |check|
|
||||||
|
out = checks.send(check)
|
||||||
next if out.nil?
|
next if out.nil?
|
||||||
|
puts
|
||||||
ofail out
|
ofail out
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user