fix(luarocks): add plugin to lua path if it was already loaded before we know its a luarock

This commit is contained in:
Folke Lemaitre 2025-10-02 14:50:37 +02:00
commit 147f5a3f55
No known key found for this signature in database
GPG key ID: 9B52594D560070AB

View file

@ -63,6 +63,9 @@ function M.update()
pkg.spec = { _raw = spec.code }
end
table.insert(ret.pkgs, pkg)
if not plugin._.pkg and plugin._.loaded and pkg.source == "rockspec" then
require("lazy.core.loader").add_to_luapath(plugin)
end
break
end
end