health#provider: fix sys.path for Python

Remove "" from sys.path (typically the first entry), which could cause
e.g. "logging" to be added from the current directory.
This gets done already for loading the host in
runtime/autoload/provider/pythonx.vim.
This commit is contained in:
Daniel Hahler
2018-04-30 16:54:35 +02:00
parent 7d8327fd30
commit 1f2301eacf

View File

@@ -186,7 +186,9 @@ function! s:version_info(python) abort
endif
let nvim_path = s:trim(s:system([
\ a:python, '-c', 'import neovim; print(neovim.__file__)']))
\ a:python, '-c',
\ 'import sys; sys.path.remove(""); ' .
\ 'import neovim; print(neovim.__file__)']))
if s:shell_error || empty(nvim_path)
return [python_version, 'unable to load neovim Python module', pypi_version,
\ nvim_path]