From 1f2301eacfdfb18d6dbd2116d9ab231a97183499 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 30 Apr 2018 16:54:35 +0200 Subject: 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. --- runtime/autoload/health/provider.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime') diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim index 9296144aaf..7067ff6c1d 100644 --- a/runtime/autoload/health/provider.vim +++ b/runtime/autoload/health/provider.vim @@ -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] -- cgit