fix(cache): never use packer paths from cache

This commit is contained in:
Folke Lemaitre 2022-12-26 18:35:02 +01:00
parent 5697098e97
commit bb53b8473c
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 5 additions and 0 deletions

View File

@ -35,6 +35,11 @@ M._loadfile = _G.loadfile
-- checks whether the cached modpath is still valid
function M.check_path(modname, modpath)
-- HACK: never return packer paths
if modpath:find("/site/pack/packer/", 1, true) then
return false
end
-- check rtp excluding plugins. This is a very small list, so should be fast
for _, path in ipairs(M.get_rtp()) do
if modpath:find(path, 1, true) == 1 then