aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/exceptions.rb
diff options
context:
space:
mode:
authorMax Howell2012-10-31 11:26:45 -0400
committerMax Howell2012-10-31 11:28:29 -0400
commit09f83c6273c0e76c7b326aca95c61c278898387e (patch)
tree60e9379e25e3b9362b5b3df59ab996b03d3eeb90 /Library/Homebrew/exceptions.rb
parent6a2e6efa679c5bba26c9bb978d6d261fb46352c4 (diff)
downloadhomebrew-09f83c6273c0e76c7b326aca95c61c278898387e.tar.bz2
Only show the troubleshooting link
This has to be a last resort right? If all we show is that link (plus preceding un-deletable output) and they don't click it then maybe we should just close the ticket and hope they'll use MacPorts instead.
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
-rw-r--r--Library/Homebrew/exceptions.rb25
1 files changed, 18 insertions, 7 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb
index 7c13522d2..ae2dd20c4 100644
--- a/Library/Homebrew/exceptions.rb
+++ b/Library/Homebrew/exceptions.rb
@@ -94,22 +94,33 @@ class BuildError < Homebrew::InstallationError
@command == './configure'
end
+ def issues
+ @issues ||= GitHub.issues_for_formula(formula.name)
+ end
+
def dump
- logs = "#{ENV['HOME']}/Library/Logs/Homebrew/#{formula}/"
- if ARGV.verbose?
+ if not ARGV.verbose?
+ puts
+ puts "#{Tty.red}READ THIS#{Tty.reset}: #{Tty.em}#{ISSUES_URL}#{Tty.reset}"
+ else
require 'cmd/--config'
require 'cmd/--env'
ohai "Configuration"
Homebrew.dump_build_config
ohai "ENV"
Homebrew.dump_build_env(env)
+ puts
+ onoe "#{formula.name} did not build"
+ unless (logs = Dir["#{ENV['HOME']}/Library/Logs/Homebrew/#{formula}/*"]).empty?
+ print "Logs: "
+ puts *logs.map{|fn| " #{fn}"}
+ end
end
puts
- onoe "#{formula.name} did not build"
- puts "Logs: #{logs}" unless Dir["#{logs}/*"].empty?
- puts "Help: #{Tty.em}#{ISSUES_URL}#{Tty.reset}"
- issues = GitHub.issues_for_formula(formula.name)
- puts *issues.map{ |s| " #{Tty.em}#{s}#{Tty.reset}" } unless issues.empty?
+ unless issues.empty?
+ puts "These open issues may also help:"
+ puts *issues.map{ |s| " #{s}" }
+ end
end
end