Skip to content

Commit 47d4baa

Browse files
committedJan 19, 2024
fix(fs): error when plugin directory to delete is not a valid directory
1 parent 9658486 commit 47d4baa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lua/lazy/manage/task/fs.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ M.clean = {
1313
assert(dir:find(Config.options.root, 1, true) == 1, self.plugin.dir .. " should be under packpath!")
1414

1515
local stat = vim.loop.fs_lstat(dir)
16-
assert(stat.type == "directory", self.plugin.dir .. " should be a directory!")
16+
assert(stat and stat.type == "directory", self.plugin.dir .. " should be a directory!")
1717

1818
Util.walk(dir, function(path, _, type)
1919
if type == "directory" then

0 commit comments

Comments
 (0)
Please sign in to comment.