diff options
author | Daniel Hahler <github@thequod.de> | 2018-07-29 01:44:46 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-07-29 01:44:46 +0200 |
commit | ade88fe4cc231710814325ac469104a252f41f2b (patch) | |
tree | 8c8233eac42c0d9e9971ba71ff24ba8b8a7fa39f | |
parent | bb33fc4f552f4d18468ce65ce0dcb5a3cbd8b1db (diff) | |
download | rneovim-ade88fe4cc231710814325ac469104a252f41f2b.tar.gz rneovim-ade88fe4cc231710814325ac469104a252f41f2b.tar.bz2 rneovim-ade88fe4cc231710814325ac469104a252f41f2b.zip |
checkhealth: do not use exepath with host_prog (#8784)
This would need to get `expand`ed to not become empty, and is being
handled by s:check_bin already.
`s:check_bin` will also complain about e.g.
"~/.pyenv/versions/3.6.6/bin/python" not being executable, but that
reflects that the host will fail to start with it.
Fixes #8778
-rw-r--r-- | runtime/autoload/health/provider.vim | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim index 7ab06c3820..d8ab26bd00 100644 --- a/runtime/autoload/health/provider.vim +++ b/runtime/autoload/health/provider.vim @@ -291,20 +291,14 @@ function! s:check_python(version) abort if empty(pyname) call health#report_warn('No Python interpreter was found with the neovim ' \ . 'module. Using the first available for diagnostics.') - endif - - if !empty(pyname) - if exists('g:'.host_prog_var) - let python_bin = exepath(pyname) - endif - let pyname = fnamemodify(pyname, ':t') + elseif exists('g:'.host_prog_var) + let python_bin = pyname endif if !empty(pythonx_errs) call health#report_error('Python provider error', pythonx_errs) - endif - if !empty(pyname) && empty(python_bin) && empty(pythonx_errs) + elseif !empty(pyname) && empty(python_bin) if !exists('g:'.host_prog_var) call health#report_info(printf('`g:%s` is not set. Searching for ' \ . '%s in the environment.', host_prog_var, pyname)) |