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
parent 6c3bda4aca
commit 147f5a3f55
No known key found for this signature in database
GPG Key ID: 9B52594D560070AB
1 changed files with 3 additions and 0 deletions

View File

@ -63,6 +63,9 @@ function M.update()
pkg.spec = { _raw = spec.code } pkg.spec = { _raw = spec.code }
end end
table.insert(ret.pkgs, pkg) 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 break
end end
end end