fix: checker should not error on non-existing dirs

This commit is contained in:
Folke Lemaitre 2022-12-20 13:44:21 +01:00
parent 50ba619d9e
commit ddf36d7748
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 2 additions and 2 deletions

View File

@ -19,8 +19,8 @@ function M.fast_check()
if plugin._.installed then if plugin._.installed then
plugin._.has_updates = nil plugin._.has_updates = nil
local info = Git.info(plugin.dir) local info = Git.info(plugin.dir)
local target = Git.get_target(plugin) local ok, target = pcall(Git.get_target, plugin)
if info and target and info.commit ~= target.commit then if ok and info and target and info.commit ~= target.commit then
plugin._.has_updates = true plugin._.has_updates = true
end end
end end