diff --git a/rc.local/pyenv.sh b/rc.local/pyenv.sh index 92daa16..da74e7c 100644 --- a/rc.local/pyenv.sh +++ b/rc.local/pyenv.sh @@ -1,8 +1,12 @@ -# Initializae pyenv +# Initialize pyenv if (( ! $LWS_FAST )); then - if can_run pyenv; then - export PYENV_ROOT=${PYENV_ROOT:-$HOME/.pyenv} + PYENV_ROOT="${PYENV_ROOT:-$HOME/.pyenv}" + if [[ -d "$PYENV_ROOT" ]]; then + export PYENV_ROOT + if ! can_run pyenv; then + append_path "$PYENV_ROOT/bin" + fi eval "$(pyenv init -)" fi fi