handle duplicate binaries

This commit is contained in:
2026-02-19 01:07:33 -05:00
parent ea73ed51b1
commit d94fee916b
4 changed files with 103 additions and 12 deletions

View File

@@ -93,10 +93,17 @@ local function run_task(task)
task.status = code == 0 and "done" or "error"
task.job_id = nil
-- Call binary callback if set
if task.binary.callback then
-- Refresh version info on success
if code == 0 then
require("glaze.checker").refresh_version(task.binary.name)
end
-- Call all registered callbacks
if task.binary.callbacks then
vim.schedule(function()
task.binary.callback(code == 0)
for _, cb in pairs(task.binary.callbacks) do
cb(code == 0)
end
end)
end