FormulaInstaller: cleanup files when pouring bottle failed
Closes Homebrew/homebrew#44325. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
7b97dca554
commit
1b33c70d46
@ -189,7 +189,12 @@ class FormulaInstaller
|
||||
begin
|
||||
install_relocation_tools unless formula.bottle_specification.skip_relocation?
|
||||
pour
|
||||
rescue => e
|
||||
rescue Exception => e
|
||||
# any exceptions must leave us with nothing installed
|
||||
ignore_interrupts do
|
||||
formula.prefix.rmtree if formula.prefix.directory?
|
||||
formula.rack.rmdir_if_possible
|
||||
end
|
||||
raise if ARGV.homebrew_developer?
|
||||
@pour_failed = true
|
||||
onoe e.message
|
||||
|
Loading…
x
Reference in New Issue
Block a user