diff options
-rw-r--r-- | runtime/autoload/health/provider.vim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim index 8f364a2ace..29bbee4888 100644 --- a/runtime/autoload/health/provider.vim +++ b/runtime/autoload/health/provider.vim @@ -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. |