mirror of https://github.com/folke/lazy.nvim.git
fix(plugin): prevent recursive loop with cond=false. Fixes #1061
This commit is contained in:
parent
6a2c47e642
commit
09e5010741
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue