Merge pull request #3543 from MikeMcQuaid/remove-env-unsets

Remove some unset/checked environment checks
This commit is contained in:
Mike McQuaid 2017-12-10 17:46:29 +00:00 committed by GitHub
commit 837ea74f44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 0 additions and 46 deletions

View File

@ -79,18 +79,6 @@ then
export HOMEBREW_GEM_PATH="$GEM_PATH"
fi
# Users may have these set, pointing the system Ruby
# at non-system gem paths
unset GEM_HOME
unset GEM_PATH
# Users may have this set, injecting arbitrary environment changes into
# bash processes inside builds
unset BASH_ENV
# Users may have this set, breaking grep's output.
unset GREP_OPTIONS
HOMEBREW_SYSTEM="$(uname -s)"
case "$HOMEBREW_SYSTEM" in
Darwin) HOMEBREW_MACOS="1" ;;

View File

@ -410,9 +410,6 @@ EOS
QUIET_ARGS=()
fi
# ensure GIT_CONFIG is unset as we need to operate on .git/config
unset GIT_CONFIG
# only allow one instance of brew update
lock update

View File

@ -1017,16 +1017,6 @@ module Homebrew
EOS
end
def check_for_old_env_vars
return unless ENV["HOMEBREW_KEEP_INFO"]
<<~EOS
`HOMEBREW_KEEP_INFO` is no longer used
info files are no longer deleted by default; you may
remove this environment variable.
EOS
end
def check_for_pth_support
homebrew_site_packages = Language::Python.homebrew_site_packages
return unless homebrew_site_packages.directory?

View File

@ -262,19 +262,6 @@ module Homebrew
EOS
end
def check_for_unsupported_curl_vars
# Support for SSL_CERT_DIR seemed to be removed in the 10.10.5 update.
return unless MacOS.version >= :yosemite
return if ENV["SSL_CERT_DIR"].nil?
<<~EOS
SSL_CERT_DIR support was removed from Apple's curl.
If fetching formulae fails you should:
unset SSL_CERT_DIR
and remove it from #{Utils::Shell.profile} if present.
EOS
end
def check_xcode_license_approved
# If the user installs Xcode-only, they have to approve the
# license or no "xc*" tool will work.

View File

@ -15,14 +15,6 @@ describe Homebrew::Diagnostic::Checks do
.to match("We do not provide support for this pre-release version.")
end
specify "#check_for_unsupported_curl_vars" do
allow(MacOS).to receive(:version).and_return(OS::Mac::Version.new("10.10"))
ENV["SSL_CERT_DIR"] = "/some/path"
expect(subject.check_for_unsupported_curl_vars)
.to match("SSL_CERT_DIR support was removed from Apple's curl.")
end
specify "#check_for_beta_xquartz" do
allow(MacOS::XQuartz).to receive(:version).and_return("2.7.10_beta2")