diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-05-01 08:41:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-01 08:41:43 +0200 |
commit | 5d6732ff094a514e8a2dd006b92a926605ecdfa8 (patch) | |
tree | 372ddb38632828c5f7aeaa58c19de203418e32cd | |
parent | 4744142fad9209a1adaa190b9bf16ddcbcb67ca9 (diff) | |
parent | 1f2301eacfdfb18d6dbd2116d9ab231a97183499 (diff) | |
download | rneovim-5d6732ff094a514e8a2dd006b92a926605ecdfa8.tar.gz rneovim-5d6732ff094a514e8a2dd006b92a926605ecdfa8.tar.bz2 rneovim-5d6732ff094a514e8a2dd006b92a926605ecdfa8.zip |
Merge #8335 from blueyed/provider
-rw-r--r-- | runtime/autoload/health/provider.vim | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim index 4adab1aa76..7067ff6c1d 100644 --- a/runtime/autoload/health/provider.vim +++ b/runtime/autoload/health/provider.vim @@ -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] |