Skip to content

Commit def5cc5

Browse files
committed
fix(cache): clear cached entry on errors
1 parent d50eab2 commit def5cc5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: lua/lazy/core/cache.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,11 @@ function M.load(modkey, modpath)
189189
end
190190

191191
chunk, err = M._loadfile(entry.modpath)
192+
M.dirty = true
192193
if chunk then
193-
M.dirty = true
194194
entry.chunk = string.dump(chunk)
195+
else
196+
M.cache[modkey] = nil
195197
end
196198
return chunk, err
197199
end

0 commit comments

Comments
 (0)