Skip to content

Commit

Permalink
fix(healthcheck): support different yazi version formats
Browse files Browse the repository at this point in the history
I think the latest version of yazi has changed its version format 馃
  • Loading branch information
mikavilpas committed Apr 5, 2024
1 parent c99491a commit 07826ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/yazi/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ return {

-- parse the version

local semver = raw_version:match('^yazi (%w+%.%w+%.%w+)')
local semver = raw_version:match('^[Yy]azi (%w+%.%w+%.%w+)')

if semver == nil then
vim.health.warn('yazi --version looks unexpected, saw ' .. raw_version)
end

local checker = require('vim.version')
if not checker.gt(semver, '0.2.4') then
if not checker.gt(semver, '0.2.3') then
return vim.health.warn(
'yazi version is too old, please upgrade to 0.2.4 or newer'
)
Expand Down

0 comments on commit 07826ef

Please sign in to comment.