aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2009-05-22 14:49:58 +0100
committerMax Howell2009-05-22 16:23:13 +0100
commit07b9037eafa7da5f039374aef674d8b6f43f2b14 (patch)
treee6d3f642a7b40fe6b3cd18ce933782e0880d98ad
parent6b0eb969b96e55dd155d2c7e20023ce4821f05a9 (diff)
downloadbrew-07b9037eafa7da5f039374aef674d8b6f43f2b14.tar.bz2
Really handle CTRL-C
-rw-r--r--Cellar/homebrew/brewkit.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Cellar/homebrew/brewkit.rb b/Cellar/homebrew/brewkit.rb
index 87ae0de87..93dd5c2fd 100644
--- a/Cellar/homebrew/brewkit.rb
+++ b/Cellar/homebrew/brewkit.rb
@@ -182,8 +182,10 @@ end
# force a prettier exception handler unless --verbose or HOMEBREW_DEBUG
Kernel.at_exit {
if $! and not (ARGV.include? '--verbose' or ENV['HOMEBREW_DEBUG'])
- exit! 130 if $1.class == Interrupt #control-c
- if $!.kind_of? StandardError
+ if $!.kind_of? Interrupt #control-c
+ puts # seeimgly a newline is more typical
+ exit! 130
+ elsif $!.kind_of? StandardError
puts "\033[1;31mError\033[0;0m: #{$!}"
exit! 1
end