From 9703111b820f99bd74a9b6b1c3e7a03d8f429005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Tue, 4 Aug 2020 15:59:00 +0200 Subject: [PATCH] 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 --- plugins/pyenv/pyenv.plugin.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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")