Skip to content

Commit

Permalink
homebrew: Load 'HOMEBREW_' prefixed variables only
Browse files Browse the repository at this point in the history
Load 'HOMEBREW_' prefixed variables only. Avoid loading 'PATH'
related variables as they are already handled in standard zsh 
configuration.
  • Loading branch information
indrajitr committed Dec 14, 2018
1 parent 1118408 commit 3093f1b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/homebrew/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ fi
# Variables
#

# Load standard Homebrew shellenv into the shell session.
# `brew shellenv` is relatively new, guard for legacy Homebrew.
# Load standard Homebrew shellenv into the shell session.
# Load 'HOMEBREW_' prefixed variables only. Avoid loading 'PATH' related
# variables as they are already handled in standard zsh configuration.
if (( $+commands[brew] )); then
eval "$(brew shellenv 2> /dev/null)"
eval "${(@M)${(f)"$(brew shellenv 2> /dev/null)"}:#export HOMEBREW*}"
fi

#
Expand Down

0 comments on commit 3093f1b

Please sign in to comment.