Skip to content

Commit 4008b57

Browse files
committed
fix(checker): make sure we show logs when only doing a fast check
1 parent 96d759d commit 4008b57

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

lua/lazy/manage/checker.lua

+8-1
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,21 @@ M.reported = {}
1313

1414
function M.start()
1515
M.fast_check()
16-
M.schedule()
16+
if M.schedule() > 0 then
17+
Manage.log({
18+
show = false,
19+
check = true,
20+
concurrency = Config.options.checker.concurrency,
21+
})
22+
end
1723
end
1824

1925
function M.schedule()
2026
State.read() -- update state
2127
local next_check = State.checker.last_check + Config.options.checker.frequency - os.time()
2228
next_check = math.max(next_check, 0)
2329
vim.defer_fn(M.check, next_check * 1000)
30+
return next_check
2431
end
2532

2633
---@param opts? {report:boolean} report defaults to true

lua/lazy/manage/init.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,13 @@ function M.check(opts)
136136
}, opts)
137137
end
138138

139-
---@param opts? ManagerOpts
139+
---@param opts? ManagerOpts | {check?:boolean}
140140
function M.log(opts)
141141
opts = M.opts(opts, { mode = "log" })
142142
return M.run({
143143
pipeline = {
144144
{ "git.origin", check = true },
145-
"git.log",
145+
{ "git.log", check = opts.check },
146146
},
147147
plugins = function(plugin)
148148
return plugin.url and plugin._.installed

0 commit comments

Comments
 (0)