From 41cc28ca42e1bcaa9716d6c7930ec9c492ffa356 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 17 Oct 2014 22:41:26 -0500 Subject: [PATCH] Pull conditional out of begin block --- Library/Homebrew/formula_installer.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index f180a1663a..c9033ce296 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -154,16 +154,17 @@ class FormulaInstaller @@attempted << f - begin - if pour_bottle? :warn => true + if pour_bottle?(:warn => true) + begin pour + rescue => e + raise if ARGV.homebrew_developer? + @pour_failed = true + onoe e.message + opoo "Bottle installation failed: building from source." + else @poured_bottle = true end - rescue => e - raise e if ARGV.homebrew_developer? - @pour_failed = true - onoe e.message - opoo "Bottle installation failed: building from source." end build_bottle_preinstall if build_bottle?