fix: only run updated checker for installed plugins. Fixes #16

This commit is contained in:
Folke Lemaitre 2022-12-20 11:58:54 +01:00
parent 7225b055f5
commit ae644a604d
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 7 additions and 5 deletions

View File

@ -16,11 +16,13 @@ end
function M.fast_check()
for _, plugin in pairs(Config.plugins) do
plugin._.has_updates = nil
local info = Git.info(plugin.dir)
local target = Git.get_target(plugin)
if info and target and info.commit ~= target.commit then
plugin._.has_updates = true
if plugin._.installed then
plugin._.has_updates = nil
local info = Git.info(plugin.dir)
local target = Git.get_target(plugin)
if info and target and info.commit ~= target.commit then
plugin._.has_updates = true
end
end
end
M.report()