From a217b03952fca6df22ecc62523d9c85883aef856 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Tue, 11 Sep 2012 20:59:59 -0400 Subject: Clean up and improve build-error output and logs All logs are now stored from each command executed in Formula.install. Error output is truncated to five lines in an attempt to not overwhelm the user and to encourage users to read the error output and report the bug properly. Maybe we can get that figure up from 70% to 90%. --- Library/Homebrew/utils.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Library/Homebrew/utils.rb') diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 0970f99fe..ff301bbcf 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -216,8 +216,10 @@ def inreplace path, before=nil, after=nil end end -def ignore_interrupts - std_trap = trap("INT") { puts "One sec, just cleaning up" } +def ignore_interrupts(opt = nil) + std_trap = trap("INT") do + puts "One sec, just cleaning up" unless opt = :quietly + end yield ensure trap("INT", std_trap) -- cgit v1.2.3