Pyenv loading is now conditional on pyenv existing

This commit is contained in:
2024-03-13 23:43:18 -06:00
parent 68ed6baba7
commit 009cc9ba0a

View File

@@ -1,6 +1,8 @@
export PYENV_ROOT="$HOME/.pyenv"
# Remove pyenv alias for shell reloads
unalias pyenv > /dev/null 2>&1
eval "$(pyenv init -)"
alias pyenv="unset _pyenv_old_pwd; pyenv"
unalias pyenv >/dev/null 2>&1
# Only load pyenv if it's installed
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
alias pyenv="unset _pyenv_old_pwd; pyenv"
fi