fix(health): show error if setup didn't run

* Fix back bootstrapping and healthcheck for fresh install with no packages to fetch.

* Revert changes to bootstrapping, make checkhealth produce more meaningful message.
This commit is contained in:
Ulibos 2023-04-27 19:21:02 +03:00 committed by GitHub
parent 903f0fe542
commit 0c7b41872e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 13 deletions

View File

@ -53,6 +53,9 @@ function M.check()
end
local spec = Config.spec
if spec == nil then
error("No plugins loaded. Did you forget to run `require(\"lazy\").setup()`?")
else
for _, plugin in pairs(spec.plugins) do
M.check_valid(plugin)
M.check_override(plugin)
@ -71,6 +74,7 @@ function M.check()
end
end
end
end
---@param plugin LazyPlugin
function M.check_valid(plugin)