bin/brew: don't set empty, unfiltered variables.

Otherwise we unconditionally set e.g. `CI`, `TRAVIS`.
This commit is contained in:
Mike McQuaid 2017-11-27 14:43:24 +00:00
parent f262cbc531
commit cd7049bb72

View File

@ -91,6 +91,9 @@ then
for VAR in HOME SHELL PATH TERM LOGNAME USER CI TRAVIS \
"${!HOMEBREW_@}" "${!TRAVIS_@}"
do
# Skip if variable value is empty.
[[ -z "${!VAR}" ]] && continue
FILTERED_ENV+=( "${VAR}=${!VAR}" )
done