reinstall: re-raise original exception after cleaning up
This commit is contained in:
parent
cf4e7e5954
commit
7966b29ac6
@ -28,10 +28,9 @@ module Homebrew extend self
|
||||
backup keg
|
||||
end
|
||||
self.install_formula formula
|
||||
rescue Exception => e
|
||||
ofail e.message unless e.message.empty?
|
||||
restore_backup keg, formula
|
||||
raise 'Reinstall failed.'
|
||||
rescue Exception
|
||||
ignore_interrupts { restore_backup(keg, formula) }
|
||||
raise
|
||||
else
|
||||
backup_path(keg).rmtree if backup_path(keg).exist?
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user