diff options
| author | Max Howell | 2012-09-27 15:39:16 -0400 |
|---|---|---|
| committer | Max Howell | 2012-09-27 15:39:35 -0400 |
| commit | 1ed0eb1dc372f585b3dbdeaaf0f684a0b0b5e898 (patch) | |
| tree | 1404e42d85470bea1ae7aa1e1c86a28bfe8200ef | |
| parent | e7b0b858ccea79e28ee66a49f7da2bdcf4deede7 (diff) | |
| download | homebrew-1ed0eb1dc372f585b3dbdeaaf0f684a0b0b5e898.tar.bz2 | |
When builds fail verbosely, be verbose
| -rw-r--r-- | Library/Homebrew/exceptions.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/formula.rb | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index b589e3456..34dabee66 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -96,6 +96,14 @@ class BuildError < Homebrew::InstallationError def dump logs = "#{ENV['HOME']}/Library/Logs/Homebrew/#{formula}/" + if ARGV.verbose? + require 'cmd/--config' + require 'cmd/--env' + ohai "Configuration" + Homebrew.dump_build_config + ohai "ENV" + Homebrew.dump_build_env(env) + end puts onoe "#{formula.name} did not build" puts "Logs: #{logs}" unless Dir["#{logs}/*"].empty? diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 78269c88d..58d207caf 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -554,7 +554,7 @@ protected rescue if f f.flush - Kernel.system "/usr/bin/tail -n 5 #{logfn}" + Kernel.system "/usr/bin/tail -n 5 #{logfn}" unless ARGV.verbose? require 'cmd/--config' $f = f def Homebrew.puts(*foo); $f.puts *foo end |
