aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerw7 <erw7.github@gmail.com>2019-04-20 18:32:14 +0900
committerJustin M. Keyes <justinkz@gmail.com>2019-04-22 21:05:39 +0200
commitd0fd66ba82c4ea6d83e2a635eeddb7c7175e02c9 (patch)
tree6bfc2469e9b15d98d246e1339ee0d369ed747a72
parent43356a43d00ff69e90afd5186e066b4d27b66d9d (diff)
downloadrneovim-d0fd66ba82c4ea6d83e2a635eeddb7c7175e02c9.tar.gz
rneovim-d0fd66ba82c4ea6d83e2a635eeddb7c7175e02c9.tar.bz2
rneovim-d0fd66ba82c4ea6d83e2a635eeddb7c7175e02c9.zip
health/provider.vim: check curl HTTPS support
closes #9925 closes #9928
-rw-r--r--runtime/autoload/health/provider.vim7
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.