From 5c532a85cf7c4f1d5bf6b9fd35e964b4545c8de3 Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Thu, 1 Aug 2024 20:07:55 +0200 Subject: fix(pyenv)!: do not load if a virtualenv is present BREAKING CHANGE: `pyenv` will not be loaded at startup anymore if a virtual env if found to avoid overwriting the expected python version. Closes #12589 --- plugins/pyenv/pyenv.plugin.zsh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/pyenv/pyenv.plugin.zsh') diff --git a/plugins/pyenv/pyenv.plugin.zsh b/plugins/pyenv/pyenv.plugin.zsh index 48c8ffaf5..b5c9a7bd3 100644 --- a/plugins/pyenv/pyenv.plugin.zsh +++ b/plugins/pyenv/pyenv.plugin.zsh @@ -1,3 +1,7 @@ +# if there is a virtualenv already loaded pyenv should not be loaded +# see https://github.com/ohmyzsh/ohmyzsh/issues/12589 +[[ -n ${VIRTUAL_ENV:-} ]] && return + pyenv_config_warning() { [[ "$ZSH_PYENV_QUIET" != true ]] || return 0 -- cgit v1.2.3-70-g09d2