diff options
author | Marc Cornellà <marc.cornella@live.com> | 2020-08-04 15:59:00 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2020-08-04 15:59:00 +0200 |
commit | 9703111b820f99bd74a9b6b1c3e7a03d8f429005 (patch) | |
tree | 7434cf6145ae53204a424175337c838a261b7e59 /plugins/pyenv/pyenv.plugin.zsh | |
parent | 69a380771e571eb38f3887adf0d92a99b4309361 (diff) | |
download | zsh-9703111b820f99bd74a9b6b1c3e7a03d8f429005.tar.gz zsh-9703111b820f99bd74a9b6b1c3e7a03d8f429005.tar.bz2 zsh-9703111b820f99bd74a9b6b1c3e7a03d8f429005.zip |
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
Diffstat (limited to 'plugins/pyenv/pyenv.plugin.zsh')
-rw-r--r-- | plugins/pyenv/pyenv.plugin.zsh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/pyenv/pyenv.plugin.zsh b/plugins/pyenv/pyenv.plugin.zsh index 4c75156bd..b7ae2046f 100644 --- a/plugins/pyenv/pyenv.plugin.zsh +++ b/plugins/pyenv/pyenv.plugin.zsh @@ -2,7 +2,11 @@ # the 'pyenv_prompt_info' function. Also loads pyenv-virtualenv if 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 pyenvdirs=("$HOME/.pyenv" "/usr/local/pyenv" "/opt/pyenv" "/usr/local/opt/pyenv") |