diff --git a/lua/impatient.lua b/lua/impatient.lua
index 367411f..2eef442 100644
--- a/lua/impatient.lua
+++ b/lua/impatient.lua
@@ -65,7 +65,9 @@ do
end
local function hash(modpath)
- return vim.loop.fs_stat(modpath).mtime.sec
+ local stat = vim.loop.fs_stat(modpath)
+ if not stat then return nil end
+ return stat.mtime.sec
end
local function load_package_with_cache(name)
Issue:
The
stat
call here can return nil when themodpath
doesn't exist https://github.com/lewis6991/impatient.nvim/blob/d9bf2648836d6338973ac000aa0cb1bdc21f87e0/lua/impatient.lua#L68 This should be handled .Cause:
Since hash is called at startup on cached filepaths you can't guarantee that location is still valid. https://github.com/lewis6991/impatient.nvim/blob/d9bf2648836d6338973ac000aa0cb1bdc21f87e0/lua/impatient.lua#L111
Trigger:
Already cached plugin being uninstalled.
Possible solution: