Commit bb10c979 authored by Jason Pickens's avatar Jason Pickens Committed by Marc Cornellà
Browse files

jenv: only add to PATH if not already on it (#8414)

This prevents the jenv plugin from messing up the PATH and putting `user/local/bin` back at the front of the PATH, undoing any careful setup done before enabling this plugin.
parent 9b5aebac
...@@ -15,7 +15,7 @@ if [[ $FOUND_JENV -eq 0 ]]; then ...@@ -15,7 +15,7 @@ if [[ $FOUND_JENV -eq 0 ]]; then
fi fi
if [[ $FOUND_JENV -eq 1 ]]; then if [[ $FOUND_JENV -eq 1 ]]; then
export PATH="${jenvdir}/bin:$PATH" (( $+commands[jenv] )) || export PATH="${jenvdir}/bin:$PATH"
eval "$(jenv init - zsh)" eval "$(jenv init - zsh)"
function jenv_prompt_info() { jenv version-name 2>/dev/null } function jenv_prompt_info() { jenv version-name 2>/dev/null }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment