Handle CTRL-C and RuntimeErrors prettily
But not the rest
This commit is contained in:
parent
8b4f826c3c
commit
ed0f997d18
@ -165,9 +165,12 @@ end
|
|||||||
|
|
||||||
# force a prettier exception handler unless --verbose or HOMEBREW_DEBUG
|
# force a prettier exception handler unless --verbose or HOMEBREW_DEBUG
|
||||||
Kernel.at_exit {
|
Kernel.at_exit {
|
||||||
unless ARGV.include? '--verbose' or ENV['HOMEBREW_DEBUG']
|
if $! and not (ARGV.include? '--verbose' or ENV['HOMEBREW_DEBUG'])
|
||||||
puts "\033[1;31mError\033[0;0m: #{$!}" if $!
|
exit! 130 if $1.class == Interrupt #control-c
|
||||||
exit! 1
|
if $!.kind_of? StandardError
|
||||||
|
puts "\033[1;31mError\033[0;0m: #{$!}"
|
||||||
|
exit! 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user