zhsrc: don't load PyEnv environment if there is no pyenv installed.

This commit is contained in:
giomba 2024-06-06 22:00:57 +02:00
parent bc08888cd9
commit 4a984e4a41
1 changed files with 5 additions and 3 deletions

8
zshrc
View File

@ -3867,9 +3867,11 @@ kdesrc-run ()
}
# Install PYENV -- to quickly switch between different Python environments
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
if command -v pyenv &> /dev/null ; then
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
fi
# Use colors in man pages
# This used to work effortlessly just a few months ago,