Skip to content

Commit

Permalink
fix(plugin): rebuild plugins after fixing optional and cond to ensure…
Browse files Browse the repository at this point in the history
… enabled will work correctly
  • Loading branch information
folke committed Oct 4, 2023
1 parent 28a8013 commit 638c8e6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/lazy/core/plugin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,12 @@ function Spec:fix_disabled()
end

self:fix_optional()
-- rebuild any plugin specs that were modified
for name, _ in pairs(self.dirty) do
self:rebuild(name)
end
self:fix_cond()
self.dirty = {}

for _, plugin in pairs(self.plugins) do
local disabled = plugin.enabled == false or (type(plugin.enabled) == "function" and not plugin.enabled())
Expand Down

0 comments on commit 638c8e6

Please sign in to comment.