mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-25 15:20:08 +00:00
fix(pyenv): fix for checking if pyenv-virtualenv is installed
Fixes #8467
This commit is contained in:
parent
10f3e0d4d4
commit
b85e1dd5d6
1 changed files with 6 additions and 2 deletions
|
@ -46,16 +46,20 @@ For more info go to https://github.com/pyenv/pyenv/#installation.
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Configuring in .zshrc only makes pyenv available for interactive shells
|
# Configuring in .zshrc only makes pyenv available for interactive shells
|
||||||
export PYENV_ROOT=$dir
|
export PYENV_ROOT="$dir"
|
||||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||||
eval "$(pyenv init --path)"
|
eval "$(pyenv init --path)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $FOUND_PYENV -eq 1 ]]; then
|
if [[ $FOUND_PYENV -eq 1 ]]; then
|
||||||
|
if [[ -z "$PYENV_ROOT" ]]; then
|
||||||
|
export PYENV_ROOT="$(pyenv root)"
|
||||||
|
fi
|
||||||
|
|
||||||
eval "$(pyenv init - --no-rehash zsh)"
|
eval "$(pyenv init - --no-rehash zsh)"
|
||||||
|
|
||||||
if (( ${+commands[pyenv-virtualenv-init]} )); then
|
if [[ -d "$PYENV_ROOT/plugins/pyenv-virtualenv" ]]; then
|
||||||
eval "$(pyenv virtualenv-init - zsh)"
|
eval "$(pyenv virtualenv-init - zsh)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue