From ae644a604d4f4a4307775ccc163596a90668da34 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 20 Dec 2022 11:58:54 +0100 Subject: [PATCH] fix: only run updated checker for installed plugins. Fixes #16 --- lua/lazy/manage/checker.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lua/lazy/manage/checker.lua b/lua/lazy/manage/checker.lua index 98e2f1b..7b9fe3c 100644 --- a/lua/lazy/manage/checker.lua +++ b/lua/lazy/manage/checker.lua @@ -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()