From c478dd5ab472a643488cb6b14e299ee46d83701c Mon Sep 17 00:00:00 2001 From: Jakob Schnitzer Date: Fri, 11 Sep 2015 11:14:29 +0200 Subject: python: remove current working directory from path Before, running Nvim in a directory containing a Python module `neovim`, or one that is imported by it or a plugin, will load that module and not the system one. So Nvim might be tricked into running arbitrary scripts from the current working directory. Fixes #1665 Fixes #2530 --- runtime/autoload/remote/host.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/autoload/remote') diff --git a/runtime/autoload/remote/host.vim b/runtime/autoload/remote/host.vim index 64f6ddb759..79dbb0ad0e 100644 --- a/runtime/autoload/remote/host.vim +++ b/runtime/autoload/remote/host.vim @@ -197,7 +197,7 @@ function! s:RequirePythonHost(host) let ver = (a:host.orig_name ==# 'python') ? 2 : 3 " Python host arguments - let args = ['-c', 'import neovim; neovim.start_host()'] + let args = ['-c', 'import sys; sys.path.remove(""); import neovim; neovim.start_host()'] " Collect registered Python plugins into args let python_plugins = remote#host#PluginsForHost(a:host.name) -- cgit