Update based on comments (without a mutex...)

This commit is contained in:
Doug Hazell 2017-02-23 15:32:44 +00:00
parent ac4c9d1324
commit 9395ec4d30

View File

@ -48,19 +48,14 @@ if [[ -n "$HOMEBREW_ENV_FILTERING" ]]
then
PATH="/usr/bin:/bin:/usr/sbin:/sbin"
export HOMEBREW_BREW_FILE
export HOMEBREW_PREFIX
export HOMEBREW_REPOSITORY
export HOMEBREW_LIBRARY
# export HOMEBREW_BREW_FILE
# export HOMEBREW_PREFIX
# export HOMEBREW_REPOSITORY
# export HOMEBREW_LIBRARY
execution_env=()
for key in HOME SHELL PATH TERM LOGNAME USER "${!HOMEBREW_@}"
do
# ugly, unfortunate consequence of lack of `export -p NAME` in bash's export
# The following failed to find non exported vars on Bash 3.2.48
[[ "$(declare -p "$key" 2>/dev/null)" =~ ^declare\ -[^\ ]*x[^\ ]*\ ]] || continue
execution_env+=( "${key}=${!key}" )
done