ARGV: Deprecate ARGV.interactive?

This commit is contained in:
Gautham G 2020-03-14 19:49:15 +05:30
parent db121c7b17
commit 1292c4559c
5 changed files with 5 additions and 9 deletions

View File

@ -126,7 +126,7 @@ class Build
system "git", "init"
system "git", "add", "-A"
end
if ARGV.interactive?
if Homebrew.args.interactive?
ohai "Entering interactive mode"
puts "Type `exit` to return and finalize the installation."
puts "Install to this prefix: #{formula.prefix}"

View File

@ -31,10 +31,6 @@ module HomebrewArgvExtension
flag?("--debug") || !ENV["HOMEBREW_DEBUG"].nil?
end
def interactive?
flag? "--interactive"
end
def keep_tmp?
include? "--keep-tmp"
end

View File

@ -1132,7 +1132,7 @@ class Formula
begin
yield self, staging
rescue
staging.retain! if ARGV.interactive? || ARGV.debug?
staging.retain! if Homebrew.args.interactive? || ARGV.debug?
raise
ensure
cp Dir["config.log", "CMakeCache.txt"], logs
@ -2084,7 +2084,7 @@ class Formula
HOMEBREW_PATH: nil,
}
unless ARGV.interactive?
unless Homebrew.args.interactive?
stage_env[:HOME] = env_home
stage_env[:_JAVA_OPTIONS] =
"#{ENV["_JAVA_OPTIONS"]&.+(" ")}-Duser.home=#{HOMEBREW_CACHE}/java_cache"

View File

@ -752,7 +752,7 @@ class FormulaInstaller
sandbox = Sandbox.new
formula.logs.mkpath
sandbox.record_log(formula.logs/"build.sandbox.log")
sandbox.allow_write_path(ENV["HOME"]) if ARGV.interactive?
sandbox.allow_write_path(ENV["HOME"]) if Homebrew.args.interactive?
sandbox.allow_write_temp_and_cache
sandbox.allow_write_log(formula)
sandbox.allow_cvs

View File

@ -26,7 +26,7 @@ module Homebrew
fi = FormulaInstaller.new(f)
fi.options = options
fi.build_bottle = ARGV.build_bottle?
fi.interactive = ARGV.interactive?
fi.interactive = Homebrew.args.interactive?
fi.git = ARGV.git?
fi.link_keg ||= keg_was_linked if keg_had_linked_opt
fi.build_from_source = true if build_from_source