From 4a984e4a41086216a699cf298e9f7dc27446a379 Mon Sep 17 00:00:00 2001 From: giomba Date: Thu, 6 Jun 2024 22:00:57 +0200 Subject: [PATCH] zhsrc: don't load PyEnv environment if there is no pyenv installed. --- zshrc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/zshrc b/zshrc index 19048d3..d6073b0 100644 --- a/zshrc +++ b/zshrc @@ -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,