diff options
| author | Mike McQuaid | 2015-09-21 15:10:23 +0100 | 
|---|---|---|
| committer | Xu Cheng | 2015-09-23 21:46:43 +0800 | 
| commit | 9aecb1be2b89843c66852ad11ba6c22ef10d2e64 (patch) | |
| tree | fdc7b7a91cb83b0fed699d6c79df304a40675085 /Library/Homebrew/formula.rb | |
| parent | b5a20e79ee99d399f8e590e6a414bf2be0a06c52 (diff) | |
| download | brew-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.rb | 8 | 
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"  | 
