From 5b9ec99fe40a732e17315061e844be2430bb0b82 Mon Sep 17 00:00:00 2001 From: Erik Lilja Date: Fri, 1 Nov 2024 13:35:00 +0100 Subject: [PATCH] fix(core): validate non-string plugin --- lua/lazy/core/fragments.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazy/core/fragments.lua b/lua/lazy/core/fragments.lua index 89b83f5..e0a3055 100644 --- a/lua/lazy/core/fragments.lua +++ b/lua/lazy/core/fragments.lua @@ -106,6 +106,9 @@ function M:add(plugin) -- short url / ref if plugin[1] then + if type(plugin[1]) ~= "string" then + return self.spec:error("Invalid plugin spec " .. vim.inspect(plugin)) + end local slash = plugin[1]:find("/", 1, true) if slash then local prefix = plugin[1]:sub(1, 4)