Skip to content

Commit

Permalink
Fixd bug for pyenv plugin
Browse files Browse the repository at this point in the history
Check pyenv-virtualenv can eval before use it.

Signed-off-by: Superbil <superbil@gmail.com>
  • Loading branch information
Superbil committed Oct 19, 2015
1 parent aa15eba commit 2c54428
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/pyenv/pyenv.plugin.zsh
Expand Up @@ -18,7 +18,10 @@ for pyenvdir in "${pyenvdirs[@]}" ; do
export PYENV_ROOT=$pyenvdir
export PATH=${pyenvdir}/bin:$PATH
eval "$(pyenv init - zsh)"
eval "$(pyenv virtualenv-init - zsh)"

if pyenv commands | command grep -q virtualenv-init; then
eval "$(pyenv virtualenv-init - zsh)"
fi

function pyenv_prompt_info() {
echo "$(pyenv version-name)"
Expand Down

0 comments on commit 2c54428

Please sign in to comment.