fix(runner): sync package specs after installing and before building

This commit is contained in:
Folke Lemaitre 2024-06-24 19:38:33 +02:00
parent 656d3d1f5b
commit 105d4805ad
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
4 changed files with 58 additions and 24 deletions

View file

@ -12,14 +12,14 @@ function M.deps(plugin)
local root = Config.options.rocks.root .. "/" .. plugin.name
local manifest_file = root .. "/lib/luarocks/rocks-5.1/manifest"
local manifest = {}
local ok = pcall(function()
pcall(function()
local load, err = loadfile(manifest_file, "t", manifest)
if not load then
error(err)
end
load()
end)
return manifest and vim.tbl_keys(manifest.repository or {})
return vim.tbl_keys(manifest.repository or {})
end
---@class RockSpec