From bb53b8473cd065dc467853222ee3462739ab16fa Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 26 Dec 2022 18:35:02 +0100 Subject: [PATCH] fix(cache): never use packer paths from cache --- lua/lazy/core/cache.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/lazy/core/cache.lua b/lua/lazy/core/cache.lua index ccb42ff8..e49cc270 100644 --- a/lua/lazy/core/cache.lua +++ b/lua/lazy/core/cache.lua @@ -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