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:
Martin Afanasjew 2016-06-24 06:40:52 +02:00
parent 66cda616d1
commit e2e35def35

View File

@ -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,