Skip to content

Commit 805b85c

Browse files
committed
fix(meta): when a plugin is both optional and disabled, then just delete it from the list
1 parent 7c49371 commit 805b85c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lua/lazy/core/meta.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,11 @@ function M:fix_disabled()
305305
for _, plugin in pairs(self.plugins) do
306306
if plugin.enabled == false or (type(plugin.enabled) == "function" and not plugin.enabled()) then
307307
changes = changes + 1
308-
self:disable(plugin)
308+
if plugin.optional then
309+
self:del(plugin.name)
310+
else
311+
self:disable(plugin)
312+
end
309313
end
310314
end
311315
self:rebuild()

0 commit comments

Comments
 (0)