From a345649510aad552c0dab4e7a666d387b4ea22d3 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 21 Dec 2022 14:56:46 +0100 Subject: [PATCH] fix(cache): if we can't load from the cache modpath, find path again instead of erroring right away --- lua/lazy/core/cache.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/cache.lua b/lua/lazy/core/cache.lua index 81d85f6..c710412 100644 --- a/lua/lazy/core/cache.lua +++ b/lua/lazy/core/cache.lua @@ -95,7 +95,8 @@ function M.loader(modname) end end chunk, err = M.load(modname, entry.modpath) - else + end + if not chunk then -- find the modpath and load the module local modpath = M.find(modname) if modpath then