brew.rb: only print "Kernel.exit" on failures.
Also, print as a warning to STDERR and print a backtrace in debug mode. Closes Homebrew/homebrew#47099. Closes Homebrew/homebrew#47154. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
cf2bf08ec9
commit
2392574a77
@ -175,8 +175,9 @@ rescue KegUnspecifiedError
|
|||||||
rescue UsageError
|
rescue UsageError
|
||||||
onoe "Invalid usage"
|
onoe "Invalid usage"
|
||||||
abort ARGV.usage
|
abort ARGV.usage
|
||||||
rescue SystemExit
|
rescue SystemExit => e
|
||||||
puts "Kernel.exit" if ARGV.verbose?
|
onoe "Kernel.exit" if ARGV.verbose? && !e.success?
|
||||||
|
puts e.backtrace if ARGV.debug?
|
||||||
raise
|
raise
|
||||||
rescue Interrupt => e
|
rescue Interrupt => e
|
||||||
puts # seemingly a newline is typical
|
puts # seemingly a newline is typical
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user