diff options
| author | Max Howell | 2011-08-31 11:07:27 +0100 |
|---|---|---|
| committer | Max Howell | 2011-08-31 15:35:59 +0100 |
| commit | b5c709e2edbde7bdb720a3b89cddf7887c903be8 (patch) | |
| tree | 260a36fac48f8f34dec1e809b6d146fd1d1af9b6 /Library/Homebrew/formula.rb | |
| parent | dfe1eb31ca80f7a5863fcf61d4308e380ae55c33 (diff) | |
| download | brew-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.rb | 10 |
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." |
