mirror of https://github.com/folke/lazy.nvim.git
fix(fs): error when plugin directory to delete is not a valid directory
This commit is contained in:
parent
96584866b9
commit
47d4baafcc
|
@ -13,7 +13,7 @@ M.clean = {
|
|||
assert(dir:find(Config.options.root, 1, true) == 1, self.plugin.dir .. " should be under packpath!")
|
||||
|
||||
local stat = vim.loop.fs_lstat(dir)
|
||||
assert(stat.type == "directory", self.plugin.dir .. " should be a directory!")
|
||||
assert(stat and stat.type == "directory", self.plugin.dir .. " should be a directory!")
|
||||
|
||||
Util.walk(dir, function(path, _, type)
|
||||
if type == "directory" then
|
||||
|
|
Loading…
Reference in New Issue