45f0a2800b1c58dd054431507f6934f6451b8078
- Author
- Marc Cornellà <marc.cornella@live.com>
- Committer
- Marc Cornellà <marc.cornella@live.com>
- Date
Message
Merge pull request #4508 from Superbil/master
Fixd bug for pyenv plugin
Diff
1diff --git a/plugins/pyenv/pyenv.plugin.zsh b/plugins/pyenv/pyenv.plugin.zsh
2index b06507b62f9e397ef35680e90987566ec498b58f..aa1f9488aed5f1165305c88cad21d10d9d9fb115 100644
3--- a/plugins/pyenv/pyenv.plugin.zsh
4+++ b/plugins/pyenv/pyenv.plugin.zsh
5@@ -18,7 +18,10 @@ for pyenvdir in "${pyenvdirs[@]}" ; do
6 export PYENV_ROOT=$pyenvdir
7 export PATH=${pyenvdir}/bin:$PATH
8 eval "$(pyenv init - zsh)"
9- eval "$(pyenv virtualenv-init - zsh)"
10+
11+ if pyenv commands | command grep -q virtualenv-init; then
12+ eval "$(pyenv virtualenv-init - zsh)"
13+ fi
14
15 function pyenv_prompt_info() {
16 echo "$(pyenv version-name)"