aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMartin Afanasjew2016-06-24 06:40:52 +0200
committerMartin Afanasjew2016-06-24 06:40:52 +0200
commite2e35def359c5c462ca8447ea9b900e0c49d3019 (patch)
tree74c82b540ba57eb2cb06f3722b5819b6f0033607 /Library
parent66cda616d1f2a2f5cb6bcece7be9ff29f5d6f863 (diff)
downloadbrew-e2e35def359c5c462ca8447ea9b900e0c49d3019.tar.bz2
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.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/bottle.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb
index 36c71f75a..8581d0a95 100644
--- a/Library/Homebrew/cmd/bottle.rb
+++ b/Library/Homebrew/cmd/bottle.rb
@@ -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,