Skip to content

Commit 84f59f2

Browse files
fix(core): Validate non-string plugin
1 parent cf8ecc2 commit 84f59f2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lua/lazy/core/fragments.lua

+3
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ function M:add(plugin)
106106

107107
-- short url / ref
108108
if plugin[1] then
109+
if type(plugin[1]) ~= "string" then
110+
return self.spec:error("Invalid plugin spec " .. vim.inspect(plugin))
111+
end
109112
local slash = plugin[1]:find("/", 1, true)
110113
if slash then
111114
local prefix = plugin[1]:sub(1, 4)

0 commit comments

Comments
 (0)