feat: make it easier to disable luarocks

This commit is contained in:
Folke Lemaitre 2024-06-24 19:44:07 +02:00
parent 105d4805ad
commit 07c067a1a8
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 8 additions and 5 deletions

View file

@ -32,10 +32,12 @@ function M.update()
---@type LazyPkgSource[]
local sources = {}
for _, s in ipairs(Config.options.pkg.sources) do
sources[#sources + 1] = {
name = s,
get = require("lazy.pkg." .. s).get,
}
if s ~= "rockspec" or Config.options.rocks.enabled then
sources[#sources + 1] = {
name = s,
get = require("lazy.pkg." .. s).get,
}
end
end
---@type LazyPkgCache