Clean up FormulaInstaller#install_dependency
This commit is contained in:
parent
b2ccbfe6af
commit
97dd879159
@ -271,26 +271,24 @@ class FormulaInstaller
|
|||||||
end
|
end
|
||||||
|
|
||||||
def install_dependency dep
|
def install_dependency dep
|
||||||
dep_tab = Tab.for_formula(dep.to_formula)
|
df = dep.to_formula
|
||||||
dep_options = dep.options
|
|
||||||
dep = 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 = FormulaInstaller.new(df)
|
||||||
fi.tab = dep_tab
|
fi.tab = Tab.for_formula(dep.to_formula)
|
||||||
fi.options = dep_options
|
fi.options = dep.options
|
||||||
fi.ignore_deps = true
|
fi.ignore_deps = true
|
||||||
fi.only_deps = false
|
fi.only_deps = false
|
||||||
fi.show_header = 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
|
outdated_keg.unlink if outdated_keg
|
||||||
fi.install
|
fi.install
|
||||||
fi.caveats
|
fi.caveats
|
||||||
fi.finish
|
fi.finish
|
||||||
ensure
|
ensure
|
||||||
# restore previous installation state if build failed
|
# 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
|
end
|
||||||
|
|
||||||
def caveats
|
def caveats
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user