fix(pyenv): preserve shims in login shells
macOS path_helper runs after .zshenv and can move system Python ahead of pyenv. Add an idempotent login hook and preserve it across later easyzsh migrations.
This commit is contained in:
+3
-2
@@ -1,7 +1,8 @@
|
||||
# pyenv (Python Version Manager), always-on via ~/.zshenv
|
||||
export PYENV_ROOT="${PYENV_ROOT:-$HOME/.pyenv}"
|
||||
[[ -d "$PYENV_ROOT/bin" ]] && export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
[[ -d "$PYENV_ROOT/shims" ]] && export PATH="$PYENV_ROOT/shims:$PATH"
|
||||
[[ -d "$PYENV_ROOT/bin" ]] && path=("$PYENV_ROOT/bin" ${path:#$PYENV_ROOT/bin})
|
||||
[[ -d "$PYENV_ROOT/shims" ]] && path=("$PYENV_ROOT/shims" ${path:#$PYENV_ROOT/shims})
|
||||
export PATH
|
||||
if [[ -o interactive ]] && command -v pyenv &> /dev/null; then
|
||||
eval "$(pyenv init - zsh)"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user