fix checkhealth to run outside lazy (#1401)

This commit is contained in:
Omar Crespo
2025-02-26 04:36:11 -05:00
committed by GitHub
parent 6f98cb0ed6
commit 44e673d132
2 changed files with 25 additions and 11 deletions

View File

@@ -27,7 +27,9 @@ setmetatable(M, {
function M.has(plugin)
local ok, LazyConfig = pcall(require, "lazy.core.config")
if ok then return LazyConfig.plugins[plugin] ~= nil end
return package.loaded[plugin] ~= nil
local res, _ = pcall(require, plugin)
return res ~= nil
end
function M.is_win() return jit.os:find("Windows") ~= nil end