aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMike McQuaid2017-04-22 12:41:42 +0100
committerGitHub2017-04-22 12:41:42 +0100
commit268f2dbde2f157bab14518a2d725a111a44e00a3 (patch)
tree1658f3b7d0cd57919b35dffee94ff4c40da74877 /bin
parent44232ab0446f25d0a59ef085870fc620a6337068 (diff)
parent69c7a20896813aefa519aaee7b75552731cd672a (diff)
downloadbrew-268f2dbde2f157bab14518a2d725a111a44e00a3.tar.bz2
Merge pull request #2476 from MikeMcQuaid/edit-env-filtering
Fix `brew edit` with environment filtering.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/brew b/bin/brew
index 43a807c7b..84be2fb1d 100755
--- a/bin/brew
+++ b/bin/brew
@@ -44,6 +44,14 @@ fi
HOMEBREW_LIBRARY="$HOMEBREW_REPOSITORY/Library"
+for VAR in EDITOR PATH
+do
+ VAR_NEW="HOMEBREW_${VAR}"
+ # TODO: find a better solution than this.
+ env | grep -q "$VAR_NEW" && continue
+ export "$VAR_NEW"="${!VAR}"
+done
+
if [[ -n "$HOMEBREW_ENV_FILTERING" ]]
then
PATH="/usr/bin:/bin:/usr/sbin:/sbin"