fix(rocks): better errors / warnings when something goes wrong with luarocks

This commit is contained in:
Folke Lemaitre 2024-06-25 13:23:25 +02:00
commit 7d3f69104f
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
11 changed files with 336 additions and 141 deletions

View file

@ -335,6 +335,20 @@ function M.load()
lazy._.loaded = {}
end
-- add hererocks when enabled and needed
if Config.options.rocks.hererocks then
for _, plugin in pairs(Config.spec.plugins) do
if plugin.build == "rockspec" then
Config.spec.meta:add({
"luarocks/hererocks",
build = "rockspec",
lazy = true,
})
break
end
end
end
local existing = Config.plugins
Config.plugins = Config.spec.plugins
-- copy state. This wont do anything during startup