ARGV: Deprecate ARGV.keep_tmp?

This commit is contained in:
Gautham G 2020-03-15 17:02:31 +05:30 committed by Mike McQuaid
parent 63ef04fdfe
commit badcaa15e4
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
5 changed files with 5 additions and 9 deletions

View File

@ -119,7 +119,7 @@ class Build
# which is not known until after the formula has been staged.
ENV["HOMEBREW_FORMULA_PREFIX"] = formula.prefix
staging.retain! if ARGV.keep_tmp?
staging.retain! if Homebrew.args.keep_tmp?
formula.patch
if Homebrew.args.git?

View File

@ -123,6 +123,6 @@ module Homebrew
end
end
ensure
FileUtils.rm_rf "update-test" unless args.keep_tmp?
FileUtils.rm_rf "update-test" unless Homebrew.args.keep_tmp?
end
end

View File

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

View File

@ -1126,7 +1126,7 @@ class Formula
def brew
@prefix_returns_versioned_prefix = true
stage do |staging|
staging.retain! if ARGV.keep_tmp?
staging.retain! if Homebrew.args.keep_tmp?
prepare_patches
begin
@ -1765,7 +1765,7 @@ class Formula
Utils.set_git_name_email!
mktemp("#{name}-test") do |staging|
staging.retain! if ARGV.keep_tmp?
staging.retain! if Homebrew.args.keep_tmp?
@testpath = staging.tmpdir
test_env[:HOME] = @testpath
setup_home @testpath

View File

@ -703,7 +703,7 @@ class FormulaInstaller
args << "--debug" if debug?
args << "--cc=#{ARGV.cc}" if ARGV.cc
args << "--default-fortran-flags" if ARGV.include? "--default-fortran-flags"
args << "--keep-tmp" if ARGV.keep_tmp?
args << "--keep-tmp" if Homebrew.args.keep_tmp?
if ARGV.env
args << "--env=#{ARGV.env}"