Merge pull request #10764 from Bo98/export-env

Let bin/brew handle its own exporting
This commit is contained in:
Mike McQuaid 2021-03-04 15:43:33 +00:00 committed by GitHub
commit cca1413bf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View File

@ -449,13 +449,6 @@ curl_version_output="$("$HOMEBREW_CURL" --version 2>/dev/null)"
curl_name_and_version="${curl_version_output%% (*}"
HOMEBREW_USER_AGENT_CURL="$HOMEBREW_USER_AGENT ${curl_name_and_version// //}"
# Declared in bin/brew
export HOMEBREW_BREW_FILE
export HOMEBREW_PREFIX
export HOMEBREW_REPOSITORY
export HOMEBREW_LIBRARY
# Declared in brew.sh
export HOMEBREW_VERSION
export HOMEBREW_DEFAULT_CACHE
export HOMEBREW_CACHE

View File

@ -75,6 +75,11 @@ do
export "$VAR_NEW"="${!VAR}"
done
export HOMEBREW_BREW_FILE
export HOMEBREW_PREFIX
export HOMEBREW_REPOSITORY
export HOMEBREW_LIBRARY
# Use VISUAL if HOMEBREW_EDITOR and EDITOR are unset.
if [[ -z "$HOMEBREW_EDITOR" && -n "$VISUAL" ]]
then