mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Catch all exceptions in brew
And thus recover from errors always, not just sometimes.
This commit is contained in:
parent
8b27aaa989
commit
fe28368697
@ -175,8 +175,8 @@ public
|
|||||||
yield self
|
yield self
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
rescue Interrupt, RuntimeError
|
rescue => e
|
||||||
if ARGV.include? '--debug'
|
if e.kind_of? Interrupt and ARGV.include? '--debug'
|
||||||
# debug mode allows the packager to intercept a failed build and
|
# debug mode allows the packager to intercept a failed build and
|
||||||
# investigate the problems
|
# investigate the problems
|
||||||
puts "Rescued build at: #{tmp}"
|
puts "Rescued build at: #{tmp}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user