mirror of
https://github.com/neovim/neovim.git
synced 2025-11-03 17:24:29 +00:00
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
This commit is contained in:
@@ -84,8 +84,8 @@ endfunction
|
|||||||
" Fetch the contents of a URL.
|
" Fetch the contents of a URL.
|
||||||
function! s:download(url) abort
|
function! s:download(url) abort
|
||||||
if executable('curl')
|
if executable('curl')
|
||||||
let rv = s:system(['curl', '-sL', a:url])
|
let rv = s:system(['curl', '-sL', a:url], '', 1, 1)
|
||||||
return s:shell_error ? 'curl error: '.s:shell_error : rv
|
return s:shell_error ? 'curl error with '.a:url.': '.s:shell_error : rv
|
||||||
elseif executable('python')
|
elseif executable('python')
|
||||||
let script = "
|
let script = "
|
||||||
\try:\n
|
\try:\n
|
||||||
|
|||||||
Reference in New Issue
Block a user