diff options
author | Daniel Hahler <git@thequod.de> | 2018-04-30 16:50:01 +0200 |
---|---|---|
committer | Daniel Hahler <git@thequod.de> | 2018-04-30 16:50:01 +0200 |
commit | 7d8327fd3010c095b0dcdeedd290667d5e15e87d (patch) | |
tree | 8e41da08b6ff92a09bec22f263cc8ad122b20d7a | |
parent | 87d3f265bc4bcedec146a4da7bb83244cea9fa6b (diff) | |
download | rneovim-7d8327fd3010c095b0dcdeedd290667d5e15e87d.tar.gz rneovim-7d8327fd3010c095b0dcdeedd290667d5e15e87d.tar.bz2 rneovim-7d8327fd3010c095b0dcdeedd290667d5e15e87d.zip |
health#provider: improve error reporting
- quote command, so that e.g. markdown handling is not applied to `__init__.py`
- include cwd
-rw-r--r-- | runtime/autoload/health/provider.vim | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim index adde784c2a..9296144aaf 100644 --- a/runtime/autoload/health/provider.vim +++ b/runtime/autoload/health/provider.vim @@ -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 |