mirror of
https://github.com/neovim/neovim.git
synced 2026-04-21 23:05:41 +00:00
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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user