aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorMax Howell2011-08-31 11:07:27 +0100
committerMax Howell2011-08-31 15:35:59 +0100
commitb5c709e2edbde7bdb720a3b89cddf7887c903be8 (patch)
tree260a36fac48f8f34dec1e809b6d146fd1d1af9b6 /Library/Homebrew/formula.rb
parentdfe1eb31ca80f7a5863fcf61d4308e380ae55c33 (diff)
downloadbrew-b5c709e2edbde7bdb720a3b89cddf7887c903be8.tar.bz2
Save config.log to ~/Library/Logs/Homebrew
Also tidied error output. Still could be tidied quite a lot but I am still considering how best to go about it.
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index fd9bcbb72..42c0e575a 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -251,9 +251,17 @@ class Formula
# so load any deps before this point! And exit asap afterwards
yield self
rescue Interrupt, RuntimeError, SystemCallError => e
- raise unless ARGV.debug?
+ unless ARGV.debug?
+ if File.exist? 'config.log'
+ logs = File.expand_path '~/Library/Logs/Homebrew/'
+ mkdir_p logs
+ cp 'config.log', logs
+ end
+ raise
+ end
onoe e.inspect
puts e.backtrace
+
ohai "Rescuing build..."
if (e.was_running_configure? rescue false) and File.exist? 'config.log'
puts "It looks like an autotools configure failed."