From 352f1fc4eaad8ce40601bd2ba3a4d1fe3b8831cc Mon Sep 17 00:00:00 2001 From: John Britton <public@johndbritton.com> Date: Thu, 5 Oct 2023 14:45:56 -0400 Subject: [PATCH] Only call `pyenv init` once --- modules/python/init.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/python/init.zsh b/modules/python/init.zsh index ce2fc693..95fa701a 100644 --- a/modules/python/init.zsh +++ b/modules/python/init.zsh @@ -29,10 +29,10 @@ if [[ -s "${local_pyenv::=${PYENV_ROOT:-$HOME/.pyenv}/bin/pyenv}" ]] \ autoload -Uz is-at-least if is-at-least 2 ${"$(pyenv --version 2>&1)"[(w)2]}; then eval "$(pyenv init --path zsh)" + else + eval "$(pyenv init - zsh)" fi - eval "$(pyenv init - zsh)" - # Prepend PEP 370 per user site packages directory, which defaults to # ~/Library/Python on macOS and ~/.local elsewhere, to PATH. The # path can be overridden using PYTHONUSERBASE.