From 009cc9ba0aec20e7158942e3b233509f3b55bbae Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Wed, 13 Mar 2024 23:43:18 -0600 Subject: [PATCH] Pyenv loading is now conditional on pyenv existing --- .config/zsh/pyenv.zsh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.config/zsh/pyenv.zsh b/.config/zsh/pyenv.zsh index f7c9adf..e80b334 100644 --- a/.config/zsh/pyenv.zsh +++ b/.config/zsh/pyenv.zsh @@ -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