mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
health/provider.vim: check curl HTTPS support
closes #9925 closes #9928
This commit is contained in:
parent
43356a43d0
commit
d0fd66ba82
@ -106,7 +106,8 @@ endfunction
|
||||
|
||||
" Fetch the contents of a URL.
|
||||
function! s:download(url) abort
|
||||
if executable('curl')
|
||||
let has_curl = executable('curl')
|
||||
if has_curl && system(['curl', '-V']) =~# 'Protocols:.*https'
|
||||
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')
|
||||
@ -124,7 +125,9 @@ function! s:download(url) abort
|
||||
\ ? 'python urllib.request error: '.s:shell_error
|
||||
\ : rv
|
||||
endif
|
||||
return 'missing `curl` and `python`, cannot make pypi request'
|
||||
return 'missing `curl` '
|
||||
\ .(has_curl ? '(with HTTPS support) ' : '')
|
||||
\ .'and `python`, cannot make web request'
|
||||
endfunction
|
||||
|
||||
" Check for clipboard tools.
|
||||
|
Loading…
Reference in New Issue
Block a user