diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 6dca1faa2f..0cf351ba2a 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -235,7 +235,7 @@ protected end end rescue - raise BuildError.new(cmd, args) + raise BuildError.new(cmd, args, $?) end private diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index 946ce66697..8b9aba4b25 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -57,8 +57,11 @@ HOMEBREW_USER_AGENT = "Homebrew #{HOMEBREW_VERSION} (Ruby #{RUBY_VERSION}-#{RUBY class ExecutionError e puts e.backtrace else onoe e - puts please_report_bug if e.kind_of? BuildError + if e.kind_of? BuildError + puts please_report_bug + puts "Exit Status: #{e.status}" + end end exit 1 rescue Exception => e