aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2017-01-08 16:46:15 +0100
committerDaniel Hahler <git@thequod.de>2017-01-08 23:26:47 +0100
commit35988b93e15a2b852d5a2dec91e992a5af37de7d (patch)
tree32fa52a2dd5ee92f8457b72ffdc7683f51a9fe05
parent7db0017f4e5bff4b31e2b665ebd80291a33e97d1 (diff)
downloadrneovim-35988b93e15a2b852d5a2dec91e992a5af37de7d.tar.gz
rneovim-35988b93e15a2b852d5a2dec91e992a5af37de7d.tar.bz2
rneovim-35988b93e15a2b852d5a2dec91e992a5af37de7d.zip
healthcheck: s:download: do not report curl errors (twice)
Since `curl -s` is used, the actual error (e.g. "curl: (6) Could not resolve host: pypi.python.org") gets not reported anyway, and s:download returns an error message with `s:shell_error` already. This changes `s:download` to also include `a:url` in the error message now. It removes > ERROR: Command error (7) curl -sL https://pypi.python.org/pypi/neovim/json: And changes > ERROR: HTTP request failed: error: curl error with https://pypi.python.org/pypi/neovim/json: 6
-rw-r--r--runtime/autoload/health/provider.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim
index 58098b08f9..417426c101 100644
--- a/runtime/autoload/health/provider.vim
+++ b/runtime/autoload/health/provider.vim
@@ -84,8 +84,8 @@ endfunction
" Fetch the contents of a URL.
function! s:download(url) abort
if executable('curl')
- let rv = s:system(['curl', '-sL', a:url])
- return s:shell_error ? 'curl error: '.s:shell_error : rv
+ let rv = s:system(['curl', '-sL', a:url], '', 1, 1)
+ return s:shell_error ? 'curl error with '.a:url.': '.s:shell_error : rv
elseif executable('python')
let script = "
\try:\n