mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 13:15:09 -07:00
provider/pythonx: return error from Detect
Ref: https://github.com/blueyed/neovim/commit/9b653ce0#commitcomment-11195449
This commit is contained in:
parent
8d42db1eea
commit
c148427c89
@ -12,9 +12,13 @@ function! provider#pythonx#Detect(ver) abort
|
|||||||
\ 'g:python_host_skip_check' : 'g:python3_host_skip_check'
|
\ 'g:python_host_skip_check' : 'g:python3_host_skip_check'
|
||||||
let skip = exists(skip_var) ? {skip_var} : 0
|
let skip = exists(skip_var) ? {skip_var} : 0
|
||||||
if exists(host_var)
|
if exists(host_var)
|
||||||
" Disable auto detection
|
" Disable auto detection.
|
||||||
let [check, err, _] = s:check_interpreter({host_var}, a:ver, skip)
|
let [check, err, _] = s:check_interpreter({host_var}, a:ver, skip)
|
||||||
return check ? [{host_var}, err] : ['', err]
|
if check
|
||||||
|
return [{host_var}, err]
|
||||||
|
endif
|
||||||
|
return ['', 'provider#pythonx#Detect: could not load Python '.a:ver
|
||||||
|
\ .' (from '.host_var.'): '.err]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let detect_versions = (a:ver == 2) ?
|
let detect_versions = (a:ver == 2) ?
|
||||||
@ -31,9 +35,8 @@ function! provider#pythonx#Detect(ver) abort
|
|||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
" No Python interpreter
|
return ['', 'provider#pythonx#Detect: could not load Python '.a:ver
|
||||||
return ['', 'Neovim module installed Python'
|
\ .': '.err]
|
||||||
\ .a:ver.' interpreter is not found.']
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:check_version(prog, ver, skip) abort
|
function! s:check_version(prog, ver, skip) abort
|
||||||
|
Loading…
Reference in New Issue
Block a user