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_bottle = ARGV.build_bottle?
|
||||||
fi.build_from_source = ARGV.build_from_source?
|
fi.build_from_source = ARGV.build_from_source?
|
||||||
fi.force_bottle = ARGV.force_bottle?
|
fi.force_bottle = ARGV.force_bottle?
|
||||||
|
fi.interactive = ARGV.interactive?
|
||||||
|
fi.interactive &&= :git if ARGV.flag? "--git"
|
||||||
fi.prelude
|
fi.prelude
|
||||||
fi.install
|
fi.install
|
||||||
fi.caveats
|
fi.caveats
|
||||||
|
|||||||
@ -185,7 +185,6 @@ module HomebrewArgvExtension
|
|||||||
flags_to_clear = %w[
|
flags_to_clear = %w[
|
||||||
--debug -d
|
--debug -d
|
||||||
--devel
|
--devel
|
||||||
--interactive -i
|
|
||||||
--HEAD
|
--HEAD
|
||||||
]
|
]
|
||||||
flags_to_clear.concat %w[--verbose -v] if quieter?
|
flags_to_clear.concat %w[--verbose -v] if quieter?
|
||||||
|
|||||||
@ -24,7 +24,7 @@ class FormulaInstaller
|
|||||||
attr_accessor :options
|
attr_accessor :options
|
||||||
mode_attr_accessor :show_summary_heading, :show_header
|
mode_attr_accessor :show_summary_heading, :show_header
|
||||||
mode_attr_accessor :build_from_source, :build_bottle, :force_bottle
|
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
|
def initialize ff
|
||||||
@f = ff
|
@f = ff
|
||||||
@ -34,6 +34,7 @@ class FormulaInstaller
|
|||||||
@build_from_source = false
|
@build_from_source = false
|
||||||
@build_bottle = false
|
@build_bottle = false
|
||||||
@force_bottle = false
|
@force_bottle = false
|
||||||
|
@interactive = false
|
||||||
@options = Options.new
|
@options = Options.new
|
||||||
|
|
||||||
@@attempted ||= Set.new
|
@@attempted ||= Set.new
|
||||||
@ -413,7 +414,7 @@ class FormulaInstaller
|
|||||||
end
|
end
|
||||||
|
|
||||||
def build_time
|
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
|
end
|
||||||
|
|
||||||
def sanitized_ARGV_options
|
def sanitized_ARGV_options
|
||||||
@ -425,9 +426,9 @@ class FormulaInstaller
|
|||||||
args << "--bottle-arch=#{ARGV.bottle_arch}" if ARGV.bottle_arch
|
args << "--bottle-arch=#{ARGV.bottle_arch}" if ARGV.bottle_arch
|
||||||
end
|
end
|
||||||
|
|
||||||
if ARGV.interactive?
|
if interactive?
|
||||||
args << "--interactive"
|
args << "--interactive"
|
||||||
args << "--git" if ARGV.flag? "--git"
|
args << "--git" if interactive == :git
|
||||||
end
|
end
|
||||||
|
|
||||||
args << "--verbose" if ARGV.verbose?
|
args << "--verbose" if ARGV.verbose?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user