Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some unset/checked environment checks #3543

Merged
merged 1 commit into from
Dec 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions Library/Homebrew/brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" ;;
Expand Down
3 changes: 0 additions & 3 deletions Library/Homebrew/cmd/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 0 additions & 10 deletions Library/Homebrew/diagnostic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1017,16 +1017,6 @@ def check_for_unlinked_but_not_keg_only
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?
Expand Down
13 changes: 0 additions & 13 deletions Library/Homebrew/extend/os/mac/diagnostic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -262,19 +262,6 @@ def check_for_bad_curl
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.
Expand Down
8 changes: 0 additions & 8 deletions Library/Homebrew/test/os/mac/diagnostic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@
.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")

Expand Down