FormulaInstaller: make tab an attr, but never a parameter
This commit is contained in:
parent
55681ca201
commit
5822aa80cf
@ -60,7 +60,8 @@ module Homebrew extend self
|
||||
tab = (f.opt_prefix.exist? ? Tab.for_keg(f.opt_prefix) : Tab.dummy_tab(f))
|
||||
outdated_keg = Keg.new(f.linked_keg.realpath) rescue nil
|
||||
|
||||
installer = FormulaInstaller.new(f, tab)
|
||||
installer = FormulaInstaller.new(f)
|
||||
installer.tab = tab
|
||||
installer.show_header = false
|
||||
installer.install_bottle = (install_bottle?(f) and tab.used_options.empty?)
|
||||
|
||||
|
||||
@ -7,15 +7,14 @@ require 'caveats'
|
||||
|
||||
class FormulaInstaller
|
||||
attr :f
|
||||
attr :tab
|
||||
attr :tab, true
|
||||
attr :show_summary_heading, true
|
||||
attr :ignore_deps, true
|
||||
attr :install_bottle, true
|
||||
attr :show_header, true
|
||||
|
||||
def initialize ff, tab=nil
|
||||
def initialize ff
|
||||
@f = ff
|
||||
@tab = tab
|
||||
@show_header = false
|
||||
@ignore_deps = ARGV.ignore_deps? || ARGV.interactive?
|
||||
@install_bottle = install_bottle? ff
|
||||
@ -170,9 +169,11 @@ class FormulaInstaller
|
||||
def install_dependency dep
|
||||
dep_tab = Tab.for_formula(dep)
|
||||
dep = dep.to_formula
|
||||
|
||||
outdated_keg = Keg.new(dep.linked_keg.realpath) rescue nil
|
||||
|
||||
fi = FormulaInstaller.new(dep, dep_tab)
|
||||
fi = FormulaInstaller.new(dep)
|
||||
fi.tab = dep_tab
|
||||
fi.ignore_deps = true
|
||||
fi.show_header = false
|
||||
oh1 "Installing #{f} dependency: #{Tty.green}#{dep}#{Tty.reset}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user