Active pyenv-mode only when pyenv exe is found.

This commit is contained in:
daanturo 2021-03-27 16:24:40 +07:00
parent 5b3f52f5fb
commit 7ae2bf962e

View file

@ -243,8 +243,8 @@
:when (featurep! +pyenv)
:after python
:config
(pyenv-mode +1)
(when (executable-find "pyenv")
(pyenv-mode +1)
(add-to-list 'exec-path (expand-file-name "shims" (or (getenv "PYENV_ROOT") "~/.pyenv"))))
(add-hook 'python-mode-local-vars-hook #'+python-pyenv-mode-set-auto-h)
(add-hook 'doom-switch-buffer-hook #'+python-pyenv-mode-set-auto-h))