aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorquinoa42 <quinoa42@outlook.jp>2017-09-30 16:08:32 -0700
committerJustin M. Keyes <justinkz@gmail.com>2017-12-17 17:45:59 +0100
commitf3d7eeff7736b10e43b52016fe9de5daa000a585 (patch)
tree344731621f15eb330c3b7c12916d5aecd1081113
parentbe53c209c0e0ccff0053fac82f2d8e1c9a40427f (diff)
downloadrneovim-f3d7eeff7736b10e43b52016fe9de5daa000a585.tar.gz
rneovim-f3d7eeff7736b10e43b52016fe9de5daa000a585.tar.bz2
rneovim-f3d7eeff7736b10e43b52016fe9de5daa000a585.zip
health.vim: Try `pyenv root` #7341
-rw-r--r--runtime/autoload/health/provider.vim16
1 files changed, 10 insertions, 6 deletions
diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim
index 205a23dcbd..fbd8d50f1b 100644
--- a/runtime/autoload/health/provider.vim
+++ b/runtime/autoload/health/provider.vim
@@ -253,14 +253,18 @@ function! s:check_python(version) abort
if !empty(pyenv)
if empty(pyenv_root)
- call health#report_warn(
- \ 'pyenv was found, but $PYENV_ROOT is not set.',
- \ ['Did you follow the final install instructions?',
- \ 'If you use a shell "framework" like Prezto or Oh My Zsh, try without.',
- \ 'Try a different shell (bash).']
+ call health#report_info(
+ \ 'pyenv was found, but $PYENV_ROOT is not set. `pyenv root` will be used.'
+ \ .' If you run into problems, try setting $PYENV_ROOT explicitly.'
\ )
+ let pyenv_root = s:trim(s:system([pyenv, 'root']))
+ endif
+
+ if !isdirectory(pyenv_root)
+ call health#report_error('Invalid pyenv root: '.pyenv_root)
else
- call health#report_ok(printf('pyenv found: "%s"', pyenv))
+ call health#report_info(printf('pyenv: %s', pyenv))
+ call health#report_info(printf('pyenv root: %s', pyenv_root))
endif
endif