mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
fix(provider): compare versions as number, not string #15937
"3.10" < "3.3" but v3.10 > v3.3 Fixes #14586
This commit is contained in:
parent
2d206d5ab2
commit
e16adbf238
@ -96,7 +96,7 @@ function! provider#pythonx#CheckForModule(prog, module, major_version) abort
|
||||
if prog_version !~ '^' . a:major_version
|
||||
return [0, prog_path . ' is Python ' . prog_version . ' and cannot provide Python '
|
||||
\ . a:major_version . '.']
|
||||
elseif prog_version =~ '^' . a:major_version && prog_version < min_version
|
||||
elseif prog_version =~ '^' . a:major_version && str2nr(prog_version[2:]) < str2nr(min_version[2:])
|
||||
return [0, prog_path . ' is Python ' . prog_version . ' and cannot provide Python >= '
|
||||
\ . min_version . '.']
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user