Skip to content

Commit

Permalink
fix: only run updated checker for installed plugins. Fixes #16
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 20, 2022
1 parent 7225b05 commit ae644a6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lua/lazy/manage/checker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ae644a6

Please sign in to comment.