Skip to content

Commit

Permalink
fix(plugin): prevent recursive loop with cond=false. Fixes #1061
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Sep 30, 2023
1 parent 6a2c47e commit 09e5010
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lua/lazy/core/plugin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 09e5010

Please sign in to comment.