fix(plugin): prevent recursive loop with cond=false. Fixes #1061

This commit is contained in:
Folke Lemaitre 2023-09-30 18:02:07 +02:00
parent 6a2c47e642
commit 09e5010741
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 5 additions and 3 deletions

View File

@ -252,10 +252,12 @@ function Spec:fix_cond()
local stack = { plugin }
while #stack > 0 do
local p = table.remove(stack)
for _, dep in ipairs(p.dependencies or {}) do
table.insert(stack, self.plugins[dep])
if not self.ignore_installed[p.name] then
for _, dep in ipairs(p.dependencies or {}) do
table.insert(stack, self.plugins[dep])
end
self.ignore_installed[p.name] = true
end
self.ignore_installed[p.name] = true
end
plugin.enabled = false
end