aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorMax Howell2012-09-11 20:59:59 -0400
committerMax Howell2012-09-25 11:31:56 -0400
commita217b03952fca6df22ecc62523d9c85883aef856 (patch)
tree82d30ca49fa0224ac6339a5c4399b3de6ba4c49f /Library/Homebrew/utils.rb
parent1100818100ae07fa49419b4ab69ebbeb59a7615d (diff)
downloadbrew-a217b03952fca6df22ecc62523d9c85883aef856.tar.bz2
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%.
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb6
1 files changed, 4 insertions, 2 deletions
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)