mirror of
https://github.com/neovim/neovim
synced 2025-07-27 08:52:10 +00:00
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
This commit is contained in:
committed by
Justin M. Keyes
parent
bb33fc4f55
commit
ade88fe4cc
@ -291,20 +291,14 @@ function! s:check_python(version) abort
|
|||||||
if empty(pyname)
|
if empty(pyname)
|
||||||
call health#report_warn('No Python interpreter was found with the neovim '
|
call health#report_warn('No Python interpreter was found with the neovim '
|
||||||
\ . 'module. Using the first available for diagnostics.')
|
\ . 'module. Using the first available for diagnostics.')
|
||||||
endif
|
elseif exists('g:'.host_prog_var)
|
||||||
|
let python_bin = pyname
|
||||||
if !empty(pyname)
|
|
||||||
if exists('g:'.host_prog_var)
|
|
||||||
let python_bin = exepath(pyname)
|
|
||||||
endif
|
|
||||||
let pyname = fnamemodify(pyname, ':t')
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !empty(pythonx_errs)
|
if !empty(pythonx_errs)
|
||||||
call health#report_error('Python provider error', 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)
|
if !exists('g:'.host_prog_var)
|
||||||
call health#report_info(printf('`g:%s` is not set. Searching for '
|
call health#report_info(printf('`g:%s` is not set. Searching for '
|
||||||
\ . '%s in the environment.', host_prog_var, pyname))
|
\ . '%s in the environment.', host_prog_var, pyname))
|
||||||
|
Reference in New Issue
Block a user