mirror of
https://github.com/neovim/neovim.git
synced 2026-07-16 06:10:39 +00:00
fix(version): return nil with empty string
(cherry picked from commit 8bdfc2ab2b)
This commit is contained in:
committed by
Christian Clason
parent
bce2364f60
commit
4ad864dd09
@@ -174,6 +174,10 @@ function M._version(version, strict) -- Adapted from https://github.com/folke/la
|
||||
version = version:match('%d[^ ]*')
|
||||
end
|
||||
|
||||
if version == nil then
|
||||
return nil
|
||||
end
|
||||
|
||||
local prerel = version:match('%-([^+]*)')
|
||||
local prerel_strict = version:match('%-([0-9A-Za-z-]*)')
|
||||
if
|
||||
|
||||
Reference in New Issue
Block a user