Skip to content

Commit

Permalink
fix(cache): never use packer paths from cache
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 26, 2022
1 parent 5697098 commit bb53b84
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/lazy/core/cache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bb53b84

Please sign in to comment.