fix(checker): allow git checks only for non-pinned plugins (#61)

This commit is contained in:
Tsakiris Tryfon 2022-12-21 15:39:08 +02:00 committed by GitHub
parent 57bea32e4f
commit a939243639
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -16,7 +16,7 @@ end
function M.fast_check() function M.fast_check()
for _, plugin in pairs(Config.plugins) do for _, plugin in pairs(Config.plugins) do
if plugin._.installed then if not plugin.pin and plugin._.installed then
plugin._.has_updates = nil plugin._.has_updates = nil
local info = Git.info(plugin.dir) local info = Git.info(plugin.dir)
local ok, target = pcall(Git.get_target, plugin) local ok, target = pcall(Git.get_target, plugin)

View File

@ -8,6 +8,9 @@ local M = {}
M.log = { M.log = {
---@param opts {updated?:boolean, check?: boolean} ---@param opts {updated?:boolean, check?: boolean}
skip = function(plugin, opts) skip = function(plugin, opts)
if opts.check and plugin.pin then
return true
end
if opts.updated and not (plugin._.updated and plugin._.updated.from ~= plugin._.updated.to) then if opts.updated and not (plugin._.updated and plugin._.updated.from ~= plugin._.updated.to) then
return true return true
end end