From 97dd879159a46070b2aff7133fe4dc027265f239 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 27 Feb 2014 14:22:42 -0600 Subject: [PATCH] Clean up FormulaInstaller#install_dependency --- Library/Homebrew/formula_installer.rb | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index fb17134473..e7c8ff0e73 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -271,26 +271,24 @@ class FormulaInstaller end def install_dependency dep - dep_tab = Tab.for_formula(dep.to_formula) - dep_options = dep.options - dep = dep.to_formula + df = dep.to_formula - outdated_keg = Keg.new(dep.linked_keg.realpath) rescue nil + outdated_keg = Keg.new(df.linked_keg.realpath) rescue nil - fi = FormulaInstaller.new(dep) - fi.tab = dep_tab - fi.options = dep_options + fi = FormulaInstaller.new(df) + fi.tab = Tab.for_formula(dep.to_formula) + fi.options = dep.options fi.ignore_deps = true fi.only_deps = false fi.show_header = false - oh1 "Installing #{f} dependency: #{Tty.green}#{dep}#{Tty.reset}" + oh1 "Installing #{f} dependency: #{Tty.green}#{df}#{Tty.reset}" outdated_keg.unlink if outdated_keg fi.install fi.caveats fi.finish ensure # restore previous installation state if build failed - outdated_keg.link if outdated_keg and not dep.installed? rescue nil + outdated_keg.link if outdated_keg and not df.installed? rescue nil end def caveats