mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 09:44:31 +00:00 
			
		
		
		
	health/provider.vim: check curl HTTPS support
closes #9925 closes #9928
This commit is contained in:
		@@ -106,7 +106,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')
 | 
					  let has_curl = executable('curl')
 | 
				
			||||||
 | 
					  if has_curl && system(['curl', '-V']) =~# 'Protocols:.*https'
 | 
				
			||||||
    let rv = s:system(['curl', '-sL', a:url], '', 1, 1)
 | 
					    let rv = s:system(['curl', '-sL', a:url], '', 1, 1)
 | 
				
			||||||
    return s:shell_error ? 'curl error with '.a:url.': '.s:shell_error : rv
 | 
					    return s:shell_error ? 'curl error with '.a:url.': '.s:shell_error : rv
 | 
				
			||||||
  elseif executable('python')
 | 
					  elseif executable('python')
 | 
				
			||||||
@@ -124,7 +125,9 @@ function! s:download(url) abort
 | 
				
			|||||||
          \ ? 'python urllib.request error: '.s:shell_error
 | 
					          \ ? 'python urllib.request error: '.s:shell_error
 | 
				
			||||||
          \ : rv
 | 
					          \ : rv
 | 
				
			||||||
  endif
 | 
					  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
 | 
					endfunction
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Check for clipboard tools.
 | 
					" Check for clipboard tools.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user