mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-29 03:44:14 +00:00
Fix back bootstrapping and healthcheck for fresh install with no packages to fetch.
This commit is contained in:
parent
903f0fe542
commit
f03bf0a82b
3 changed files with 25 additions and 27 deletions
|
@ -53,19 +53,23 @@ function M.check()
|
|||
end
|
||||
|
||||
local spec = Config.spec
|
||||
for _, plugin in pairs(spec.plugins) do
|
||||
M.check_valid(plugin)
|
||||
M.check_override(plugin)
|
||||
end
|
||||
if #spec.notifs > 0 then
|
||||
error("Issues were reported when loading your specs:")
|
||||
for _, notif in ipairs(spec.notifs) do
|
||||
local lines = vim.split(notif.msg, "\n")
|
||||
for _, line in ipairs(lines) do
|
||||
if notif.level == vim.log.levels.ERROR then
|
||||
error(line)
|
||||
else
|
||||
warn(line)
|
||||
if spec == nil then
|
||||
ok("no packages setup for installation so far.")
|
||||
else
|
||||
for _, plugin in pairs(spec.plugins) do
|
||||
M.check_valid(plugin)
|
||||
M.check_override(plugin)
|
||||
end
|
||||
if #spec.notifs > 0 then
|
||||
error("Issues were reported when loading your specs:")
|
||||
for _, notif in ipairs(spec.notifs) do
|
||||
local lines = vim.split(notif.msg, "\n")
|
||||
for _, line in ipairs(lines) do
|
||||
if notif.level == vim.log.levels.ERROR then
|
||||
error(line)
|
||||
else
|
||||
warn(line)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue