1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-22 05:40:08 +00:00

pyenv: ignore $PATH pyenv if on WSL

This solves the problem where the used pyenv is actually the one in a
Windows folder, instead of in WSL.

Fixes #9034
This commit is contained in:
Marc Cornellà 2020-08-04 15:59:00 +02:00
parent 69a380771e
commit 9703111b82

View file

@ -2,7 +2,11 @@
# the 'pyenv_prompt_info' function. Also loads pyenv-virtualenv if available. # the 'pyenv_prompt_info' function. Also loads pyenv-virtualenv if available.
# Load pyenv only if command not already available # Load pyenv only if command not already available
command -v pyenv &> /dev/null && FOUND_PYENV=1 || FOUND_PYENV=0 if command -v pyenv &> /dev/null && [[ "$(uname -r)" != *icrosoft* ]]; then
FOUND_PYENV=1
else
FOUND_PYENV=0
fi
if [[ $FOUND_PYENV -ne 1 ]]; then if [[ $FOUND_PYENV -ne 1 ]]; then
pyenvdirs=("$HOME/.pyenv" "/usr/local/pyenv" "/opt/pyenv" "/usr/local/opt/pyenv") pyenvdirs=("$HOME/.pyenv" "/usr/local/pyenv" "/opt/pyenv" "/usr/local/opt/pyenv")