Skip to content

Commit

Permalink
Improve regex for jj version check
Browse files Browse the repository at this point in the history
  • Loading branch information
zschreur committed Jul 15, 2024
1 parent 8fcd988 commit 525c54c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/telescope/_extensions/jj.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ return telescope.register_extension({
end

local obj = vim.system({ "jj", "--version" }, { text = true }):wait()
for major, minor, patch in string.gmatch(obj.stdout, ".*(%d+).(%d+).(%d+)") do
for major, minor, patch in string.gmatch(obj.stdout, ".*(%d+)%.(%d+)%.(%d+)") do
if not (tonumber(major) == 0 and tonumber(minor) >= 19) then
vim.health.warn("requires jj version 0.19.0 or greater")
vim.health.info("found jj version: " .. major .. "." .. minor .. "." .. patch)
Expand Down

0 comments on commit 525c54c

Please sign in to comment.