Skip to content

Commit

Permalink
fix(fs): error when plugin directory to delete is not a valid directory
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jan 19, 2024
1 parent 9658486 commit 47d4baa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/lazy/manage/task/fs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 47d4baa

Please sign in to comment.