diff options
| author | Jack Nagel | 2014-03-13 10:11:00 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-03-13 15:59:53 -0500 |
| commit | 77c3404f3ba4234d12a96203dcda1d724647fcf0 (patch) | |
| tree | 57a1ff81e0c346153a4e6f18e85a1b93a2bab433 | |
| parent | 9b713ba0d1d3b5d6d3b1c50aa0b976c3da3cefab (diff) | |
| download | homebrew-77c3404f3ba4234d12a96203dcda1d724647fcf0.tar.bz2 | |
Make interactive an installer mode
| -rw-r--r-- | Library/Homebrew/cmd/install.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/extend/ARGV.rb | 1 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 9 |
3 files changed, 7 insertions, 5 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 8a13397b2..2babedd26 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -110,6 +110,8 @@ module Homebrew extend self fi.build_bottle = ARGV.build_bottle? fi.build_from_source = ARGV.build_from_source? fi.force_bottle = ARGV.force_bottle? + fi.interactive = ARGV.interactive? + fi.interactive &&= :git if ARGV.flag? "--git" fi.prelude fi.install fi.caveats diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb index de1f428e0..2473d00d9 100644 --- a/Library/Homebrew/extend/ARGV.rb +++ b/Library/Homebrew/extend/ARGV.rb @@ -185,7 +185,6 @@ module HomebrewArgvExtension flags_to_clear = %w[ --debug -d --devel - --interactive -i --HEAD ] flags_to_clear.concat %w[--verbose -v] if quieter? diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index fff088e04..2bf1f979f 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -24,7 +24,7 @@ class FormulaInstaller attr_accessor :options mode_attr_accessor :show_summary_heading, :show_header mode_attr_accessor :build_from_source, :build_bottle, :force_bottle - mode_attr_accessor :ignore_deps, :only_deps + mode_attr_accessor :ignore_deps, :only_deps, :interactive def initialize ff @f = ff @@ -34,6 +34,7 @@ class FormulaInstaller @build_from_source = false @build_bottle = false @force_bottle = false + @interactive = false @options = Options.new @@attempted ||= Set.new @@ -413,7 +414,7 @@ class FormulaInstaller end def build_time - @build_time ||= Time.now - @start_time unless ARGV.interactive? or @start_time.nil? + @build_time ||= Time.now - @start_time unless interactive? or @start_time.nil? end def sanitized_ARGV_options @@ -425,9 +426,9 @@ class FormulaInstaller args << "--bottle-arch=#{ARGV.bottle_arch}" if ARGV.bottle_arch end - if ARGV.interactive? + if interactive? args << "--interactive" - args << "--git" if ARGV.flag? "--git" + args << "--git" if interactive == :git end args << "--verbose" if ARGV.verbose? |
