Skip to content

Commit

Permalink
pyenv: ignore $PATH pyenv if on WSL
Browse files Browse the repository at this point in the history
This solves the problem where the used pyenv is actually the one in a
Windows folder, instead of in WSL.

Fixes ohmyzsh#9034
  • Loading branch information
mcornella committed Aug 4, 2020
1 parent 69a3807 commit 9703111
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/pyenv/pyenv.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 9703111

Please sign in to comment.