Skip to content

Commit

Permalink
fix(update): exclude -<specrev> from version
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Dec 11, 2023
1 parent d01b1e6 commit b7e096b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lua/rocks/state.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ state.installed_rocks = nio.create(function()
local installed_rock_list = future.wait()

for name, version in installed_rock_list:gmatch("(%S+)%s+(%S+)%s+installed%s+%S+") do
-- Exclude -<specrev>
-- Exclude -<specrev> from version
rocks[name] = { name = name, version = version:match("([^-]+)") }
end

Expand Down Expand Up @@ -71,7 +71,12 @@ state.outdated_rocks = nio.create(function()
local installed_rock_list = future.wait()

for name, version, target_version in installed_rock_list:gmatch("(%S+)%s+(%S+)%s+(%S+)%s+%S+") do
rocks[name] = { name = name, version = version, target_version = target_version }
-- Exclude -<specrev> from versions
rocks[name] = {
name = name,
version = version:match("([^-]+)"),
target_version = target_version:match("([^-]+)"),
}
end

return rocks
Expand Down

0 comments on commit b7e096b

Please sign in to comment.