aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMike McQuaid2017-05-13 11:42:01 +0100
committerMike McQuaid2017-05-13 11:42:01 +0100
commit8205e61e6493f7c0a91c0311a321a80830f70bc3 (patch)
tree99de15601ca526b829aac5884c2c9b2194e082d9 /bin
parent459fef3b09b25d3e24cce6aa6f2e3a7bd5460a2b (diff)
downloadbrew-8205e61e6493f7c0a91c0311a321a80830f70bc3.tar.bz2
More environment filtering tweaks
- only document HOMEBREW_* variables in the manpage (although still read from all the original environment variables). - resort manpage environment variables in alphabetical order - check the original path for trailing slashes
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/brew b/bin/brew
index 306be5ea0..20cf9564d 100755
--- a/bin/brew
+++ b/bin/brew
@@ -44,7 +44,10 @@ fi
HOMEBREW_LIBRARY="$HOMEBREW_REPOSITORY/Library"
-for VAR in EDITOR PATH BINTRAY_USER BINTRAY_KEY
+# Whitelist and copy to HOMEBREW_* all variables previously mentioned in
+# manpage or used elsewhere by Homebrew.
+for VAR in AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY BINTRAY_USER BINTRAY_KEY \
+ BROWSER EDITOR GIT PATH VISUAL
do
VAR_NEW="HOMEBREW_${VAR}"
[[ -n "${!VAR_NEW}" ]] && continue