diff options
| author | Max Howell | 2009-05-21 17:55:23 +0100 |
|---|---|---|
| committer | Max Howell | 2009-05-21 17:55:23 +0100 |
| commit | ed0f997d18802f833711888f2f5f2f57979e1aaf (patch) | |
| tree | f9b179f1ddb4b9d785538f5d3afdd44807f808b1 | |
| parent | 8b4f826c3c8f93d780a5fc052d4934ba51b1fdaa (diff) | |
| download | brew-ed0f997d18802f833711888f2f5f2f57979e1aaf.tar.bz2 | |
Handle CTRL-C and RuntimeErrors prettily
But not the rest
| -rw-r--r-- | Cellar/homebrew/brewkit.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Cellar/homebrew/brewkit.rb b/Cellar/homebrew/brewkit.rb index 96c653767..060145b71 100644 --- a/Cellar/homebrew/brewkit.rb +++ b/Cellar/homebrew/brewkit.rb @@ -165,9 +165,12 @@ end # force a prettier exception handler unless --verbose or HOMEBREW_DEBUG Kernel.at_exit { - unless ARGV.include? '--verbose' or ENV['HOMEBREW_DEBUG'] - puts "\033[1;31mError\033[0;0m: #{$!}" if $! - exit! 1 + if $! and not (ARGV.include? '--verbose' or ENV['HOMEBREW_DEBUG']) + exit! 130 if $1.class == Interrupt #control-c + if $!.kind_of? StandardError + puts "\033[1;31mError\033[0;0m: #{$!}" + exit! 1 + end end } |
