mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	Merge #8335 from blueyed/provider
This commit is contained in:
		| @@ -51,7 +51,7 @@ function! s:shellify(cmd) abort | ||||
|     return a:cmd | ||||
|   endif | ||||
|   return join(map(copy(a:cmd), | ||||
|     \'v:val =~# ''\m[\-.a-zA-Z_/]'' ? shellescape(v:val) : v:val'), ' ') | ||||
|     \'v:val =~# ''\m[^\-.a-zA-Z_/]'' ? shellescape(v:val) : v:val'), ' ') | ||||
| endfunction | ||||
|  | ||||
| " Run a system command and timeout after 30 seconds. | ||||
| @@ -70,7 +70,8 @@ function! s:system(cmd, ...) abort | ||||
|   let jobid = jobstart(a:cmd, opts) | ||||
|  | ||||
|   if jobid < 1 | ||||
|     call health#report_error(printf('Command error (job=%d): %s', jobid, s:shellify(a:cmd))) | ||||
|     call health#report_error(printf('Command error (job=%d): `%s` (in %s)', | ||||
|           \ jobid, s:shellify(a:cmd), string(getcwd()))) | ||||
|     let s:shell_error = 1 | ||||
|     return opts.output | ||||
|   endif | ||||
| @@ -84,8 +85,8 @@ function! s:system(cmd, ...) abort | ||||
|     call health#report_error(printf('Command timed out: %s', s:shellify(a:cmd))) | ||||
|     call jobstop(jobid) | ||||
|   elseif s:shell_error != 0 && !ignore_error | ||||
|     call health#report_error(printf("Command error (job=%d): %s\nOutput: %s", jobid, | ||||
|           \ s:shellify(a:cmd), opts.output)) | ||||
|     call health#report_error(printf("Command error (job=%d): `%s` (in %s)\nOutput: %s", | ||||
|           \ jobid, s:shellify(a:cmd), string(getcwd()), opts.output)) | ||||
|   endif | ||||
|  | ||||
|   return opts.output | ||||
| @@ -185,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
	 Justin M. Keyes
					Justin M. Keyes