mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-30 06:35:28 +08:00
Fix #2216 - Tolerate versions without path numbers
This commit is contained in:
@@ -14,7 +14,7 @@ function! ale#semver#GetVersion(executable, version_lines) abort
|
||||
let l:version = get(s:version_cache, a:executable, [])
|
||||
|
||||
for l:line in a:version_lines
|
||||
let l:match = matchlist(l:line, '\v(\d+)\.(\d+)\.(\d+)')
|
||||
let l:match = matchlist(l:line, '\v(\d+)\.(\d+)\.?(\d?)')
|
||||
|
||||
if !empty(l:match)
|
||||
let l:version = [l:match[1] + 0, l:match[2] + 0, l:match[3] + 0]
|
||||
|
||||
Reference in New Issue
Block a user