aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2009-11-05 18:14:31 +0000
committerMax Howell2009-11-07 18:22:34 +0000
commit6386ce4df509b49f39d4dcddfe8d9020314c9df7 (patch)
tree503e91d655549e58942bce7eb75942fe5f01a4e5
parent7ec2874746bf504425946045bcbae7a103f151f8 (diff)
downloadbrew-6386ce4df509b49f39d4dcddfe8d9020314c9df7.tar.bz2
Provide system info for build errors
-rwxr-xr-xbin/brew16
1 files changed, 10 insertions, 6 deletions
diff --git a/bin/brew b/bin/brew
index 382ec023f..e59a3d2f8 100755
--- a/bin/brew
+++ b/bin/brew
@@ -69,6 +69,13 @@ library path: #{homebrew_rubylib_path}
EOS
end
+def please_report_bug; <<-EOS
+Please report this bug to #{HOMEBREW_WWW} including the following information:
+Mac OS X: #{MACOS_VERSION}
+Ponk: #{macports_or_fink_installed?}
+ EOS
+end
+
begin
require 'brew.h'
@@ -247,16 +254,13 @@ rescue SystemCallError, RuntimeError => e
puts e.backtrace
else
onoe e
+ puts please_report_bug if e.kind_of? BuildError
end
exit 1
rescue Exception => e
onoe "Homebrew has failed you :("
- puts "Please report this bug at: #{HOMEBREW_WWW}"
- puts "Please include the following information:"
- ohai "Environment"
- puts "Mac OS X #{MACOS_VERSION}"
- puts "Macports or Fink? #{macports_or_fink_installed?}"
- ohai e.inspect
+ puts please_report_bug
+ puts e.inspect
puts e.backtrace
exit 1
end