Skip to content

Commit

Permalink
fix(sync/ui): progess ui displayed forever (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb authored May 30, 2024
1 parent ccdaaa1 commit 629b37b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lua/rocks/operations/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,20 @@ operations.sync = function(user_rocks, on_complete)
if config.generate_help_pages then
vim.cmd("helptags ALL")
end
if not vim.tbl_isempty(error_handles) then
local message = "Sync completed with errors! Run ':Rocks log' for details."
log.error(message)
progress_handle:report({
title = "Error",
message = message,
})
progress_handle:cancel()
for _, error_handle in pairs(error_handles) do
error_handle:cancel()
end
else
progress_handle:finish()
end
if on_complete then
on_complete()
end
Expand Down

0 comments on commit 629b37b

Please sign in to comment.