Make interactive an installer mode
This commit is contained in:
parent
05836649fe
commit
908d2ba792
@ -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
|
||||
|
||||
@ -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?
|
||||
|
||||
@ -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?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user