fix(handler): properly show errors generated by setting up handlers

This commit is contained in:
Folke Lemaitre 2023-01-02 09:36:52 +01:00
parent 6ff480bdee
commit 4d77cf2efe
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 4 additions and 1 deletions

View File

@ -1,3 +1,4 @@
local Util = require("lazy.core.util")
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
---@class LazyHandler ---@class LazyHandler
@ -23,7 +24,9 @@ function M.setup()
M.handlers[type] = M.new(type) M.handlers[type] = M.new(type)
end end
for _, plugin in pairs(Config.plugins) do for _, plugin in pairs(Config.plugins) do
Util.try(function()
M.enable(plugin) M.enable(plugin)
end, "Failed to setup handlers for " .. plugin.name)
end end
end end