aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/brew3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/brew b/bin/brew
index 4ac9473a7..7d36ff92d 100755
--- a/bin/brew
+++ b/bin/brew
@@ -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