浏览代码

fix(pyenv): fix pyenv-virtualenv detection under macOS.

Kaede Hoshikawa 2 年之前
父节点
当前提交
c6c364317d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/pyenv/pyenv.plugin.zsh

+ 1 - 1
plugins/pyenv/pyenv.plugin.zsh

@@ -78,7 +78,7 @@ if [[ $FOUND_PYENV -eq 1 ]]; then
   eval "$(pyenv init - --no-rehash zsh)"
 
   # If pyenv-virtualenv exists, load it
-  if [[ -d "$(pyenv root)/plugins/pyenv-virtualenv" && "$ZSH_PYENV_VIRTUALENV" != false ]]; then
+  if [[ "$(pyenv commands)" =~ "virtualenv-init" && "$ZSH_PYENV_VIRTUALENV" != false ]]; then
     eval "$(pyenv virtualenv-init - zsh)"
   fi