Let commands decide what mode the installer should use

This commit is contained in:
Jack Nagel 2014-03-02 00:19:37 -06:00
parent ea85812c58
commit ffbe5bf22c
3 changed files with 6 additions and 3 deletions

View File

@ -104,6 +104,8 @@ module Homebrew extend self
def install_formula f
fi = FormulaInstaller.new(f)
fi.ignore_deps = ARGV.ignore_deps? || ARGV.interactive?
fi.only_deps = ARGV.only_deps?
fi.install
fi.caveats
fi.finish

View File

@ -65,6 +65,8 @@ module Homebrew extend self
installer = FormulaInstaller.new(f)
installer.options |= tab.used_options
installer.show_header = false
installer.ignore_deps = ARGV.ignore_deps?
fi.only_deps = ARGV.only_deps?
oh1 "Upgrading #{f.name}"

View File

@ -22,8 +22,8 @@ class FormulaInstaller
def initialize ff
@f = ff
@show_header = false
@ignore_deps = ARGV.ignore_deps? || ARGV.interactive?
@only_deps = ARGV.only_deps?
@ignore_deps = false
@only_deps = false
@options = Options.new
@@attempted ||= Set.new
@ -296,7 +296,6 @@ class FormulaInstaller
fi.options |= dep.options
fi.options |= inherited_options
fi.ignore_deps = true
fi.only_deps = false
fi.show_header = false
oh1 "Installing #{f} dependency: #{Tty.green}#{df}#{Tty.reset}"
outdated_keg.unlink if outdated_keg