Remove ARGV.env

Replace with `Homebrew.args.env`.

Part of #5730.
This commit is contained in:
Mike McQuaid 2020-05-23 13:49:10 +01:00
parent e9d45a6692
commit d5ff4f5327
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
3 changed files with 3 additions and 7 deletions

View File

@ -15,10 +15,6 @@ module HomebrewArgvExtension
value "cc"
end
def env
value "env"
end
private
def options_only

View File

@ -6,7 +6,7 @@ require "extend/ENV/std"
require "extend/ENV/super"
def superenv?
ARGV.env != "std" && Superenv.bin
Homebrew.args.env != "std" && Superenv.bin
end
module EnvActivation

View File

@ -731,8 +731,8 @@ class FormulaInstaller
args << "--cc=#{ARGV.cc}" if ARGV.cc
args << "--keep-tmp" if Homebrew.args.keep_tmp?
if ARGV.env
args << "--env=#{ARGV.env}"
if Homebrew.args.env.present?
args << "--env=#{Homebrew.args.env}"
elsif formula.env.std? || formula.deps.select(&:build?).any? { |d| d.name == "scons" }
args << "--env=std"
end