forked from extern/ohmyzsh
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.
This commit is contained in:
parent
9b5aebac2b
commit
bb10c979ef
@ -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 }
|
||||||
|
Loading…
Reference in New Issue
Block a user