bottle: avoid raising exception in ensure block
The `ensure` block can be reached before the tab is modified (and thus before `original_tab` gets populated). Avoid raising an exception when attempting to restore a tab that hasn't been modified yet, e.g. because relocating some of the Mach-O binaries failed.
This commit is contained in:
parent
66cda616d1
commit
e2e35def35
@ -255,7 +255,7 @@ module Homebrew
|
||||
raise
|
||||
ensure
|
||||
ignore_interrupts do
|
||||
original_tab.write
|
||||
original_tab.write if original_tab
|
||||
keg.relocate_install_names Keg::PREFIX_PLACEHOLDER, prefix,
|
||||
Keg::CELLAR_PLACEHOLDER, cellar
|
||||
keg.relocate_text_files Keg::PREFIX_PLACEHOLDER, prefix,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user