mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
fix(fs): error when plugin directory to delete is not a valid directory
This commit is contained in:
parent
96584866b9
commit
47d4baafcc
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue