fix(loader): don't load handlers before installing plugins

This commit is contained in:
Folke Lemaitre 2023-10-16 15:05:16 +02:00
parent ed6c9ffe21
commit 1cfd6d1f36
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
6 changed files with 49 additions and 25 deletions

View file

@ -415,7 +415,7 @@ function M:plugin(plugin)
else
self:append(" ")
local reason = {}
if plugin._.kind ~= "disabled" then
if plugin._.kind ~= "disabled" and plugin._.handlers_enabled then
for handler in pairs(Handler.types) do
if plugin[handler] then
local values = Handler.handlers[handler]:values(plugin)
@ -542,17 +542,19 @@ function M:details(plugin)
end
end)
for handler in pairs(Handler.types) do
if plugin[handler] then
table.insert(props, {
handler,
function()
for _, value in ipairs(plugin[handler]) do
self:reason({ [handler] = value })
self:append(" ")
end
end,
})
if plugin._.handlers_enabled then
for handler in pairs(Handler.types) do
if plugin[handler] then
table.insert(props, {
handler,
function()
for _, value in ipairs(Plugin.values(plugin, handler, true)) do
self:reason({ [handler] = value })
self:append(" ")
end
end,
})
end
end
end
self:props(props, { indent = 6 })