Skip to content

Commit

Permalink
fix(sync): Better error message if entry can't be parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Dec 17, 2023
1 parent 26f6357 commit 4f16f8e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lua/rocks/operations.lua
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,12 @@ operations.sync = function(user_rocks)

for _, key in ipairs(to_install) do
nio.scheduler()
if not user_rocks[key].version then
local message = ("Could not parse rock: %s"):format(vim.inspect(user_rocks[key]))
log.error(message)
report_error(message)
goto skip_install
end
progress_handle:report({
message = ("Installing: %s"):format(key),
})
Expand All @@ -328,6 +334,7 @@ operations.sync = function(user_rocks)
message = ("Installed: %s"):format(key),
percentage = get_progress_percentage(),
})
::skip_install::
end
for _, key in ipairs(to_updowngrade) do
local is_downgrading = vim.version.parse(user_rocks[key].version)
Expand Down

0 comments on commit 4f16f8e

Please sign in to comment.