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