Merge pull request #1981 from zbirenbaum/python_fix

Fix crash on open caused by incorrect conditional in python module
main
Zach Birenbaum 3 years ago committed by GitHub
commit 20641f3447
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -114,14 +114,18 @@ if (( $+VIRTUALENVWRAPPER_VIRTUALENV || $+commands[virtualenv] )) \
pyenv_plugins=(${(@oM)${(f)"$(pyenv commands --no-sh 2> /dev/null)"}:#virtualenv*}) pyenv_plugins=(${(@oM)${(f)"$(pyenv commands --no-sh 2> /dev/null)"}:#virtualenv*})
fi fi
# Optionally activate 'virtualenv' plugin when available.
if (( $pyenv_plugins[(i)virtualenv-init] <= $#pyenv_plugins )); then if (( $pyenv_plugins[(i)virtualenv-init] <= $#pyenv_plugins )); then
# Enable 'virtualenv' with 'pyenv'.
eval "$(pyenv virtualenv-init - zsh)" eval "$(pyenv virtualenv-init - zsh)"
fi
# Optionally activate 'virtualenvwrapper' plugin when available. # Optionally activate 'virtualenvwrapper' plugin when available.
if (( $pyenv_plugins[(i)virtualenvwrapper(_lazy|)] <= $#pyenv_plugins )); then if (( $pyenv_plugins[(i)virtualenvwrapper(_lazy|)] <= $#pyenv_plugins )); then
pyenv "$pyenv_plugins[(R)virtualenvwrapper(_lazy|)]" pyenv "$pyenv_plugins[(R)virtualenvwrapper(_lazy|)]"
fi fi
unset pyenv_plugins
else else
# Fallback to 'virtualenvwrapper' without 'pyenv' wrapper if 'python' is # Fallback to 'virtualenvwrapper' without 'pyenv' wrapper if 'python' is
# available in '$path'. # available in '$path'.
@ -140,9 +144,6 @@ if (( $+VIRTUALENVWRAPPER_VIRTUALENV || $+commands[virtualenv] )) \
unset virtenv_sources unset virtenv_sources
fi fi
unset pyenv_plugins
fi
# Load conda into the shell session, if requested. # Load conda into the shell session, if requested.
zstyle -T ':prezto:module:python' conda-init zstyle -T ':prezto:module:python' conda-init
if (( $? && $+commands[conda] )); then if (( $? && $+commands[conda] )); then

Loading…
Cancel
Save