Skip to content

Commit 5c09e6f

Browse files
committed
fix(luarocks): proper parsing of dependency name. Closes #2086
1 parent e6a8824 commit 5c09e6f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lua/lazy/pkg/rockspec.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,10 @@ function M.get(plugin)
285285

286286
---@param dep string
287287
local rocks = vim.tbl_filter(function(dep)
288-
local name = dep:gsub("%s.*", "")
288+
local name = dep:match("^%s*([^~><=%s]+)")
289+
if not name then
290+
return false
291+
end
289292
local url = Community.get_url(name)
290293
local spec = Community.get_spec(name)
291294

0 commit comments

Comments
 (0)