aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorMike McQuaid2015-09-21 15:10:23 +0100
committerXu Cheng2015-09-23 21:46:43 +0800
commit9aecb1be2b89843c66852ad11ba6c22ef10d2e64 (patch)
treefdc7b7a91cb83b0fed699d6c79df304a40675085 /Library/Homebrew/formula.rb
parentb5a20e79ee99d399f8e590e6a414bf2be0a06c52 (diff)
downloadbrew-9aecb1be2b89843c66852ad11ba6c22ef10d2e64.tar.bz2
formula: increase fail log lines, allow config.
The default is almost never useful. 15 seems like a good medium as it'll not fill a 80x24 default but provides a bit more context. Also allow it to be overriden for developers and `test-bot`.
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 36eb41b5a..3e7e24d43 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -1304,8 +1304,14 @@ class Formula
$stdout.flush
unless $?.success?
+ log_lines = ENV["HOMEBREW_FAIL_LOG_LINES"]
+ log_lines ||= "15"
+
log.flush
- Kernel.system "/usr/bin/tail", "-n", "5", logfn unless verbose
+ unless verbose
+ puts "Last #{log_lines} lines from #{logfn}:"
+ Kernel.system "/usr/bin/tail", "-n", log_lines, logfn
+ end
log.puts
require "cmd/config"