Skip to content

Commit

Permalink
fix(registry): exhaust streaming parser when loading "file:" registri…
Browse files Browse the repository at this point in the history
…es (#1708)
  • Loading branch information
williamboman authored May 14, 2024
1 parent 1b3d604 commit 49ff59a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lua/mason-registry/sources/file.lua
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,15 @@ function FileRegistrySource:install()
return ("Failed to parse package YAML: %s"):format(table.concat(stderr_buffer, ""))
end))

-- Exhaust parser coroutine.
for raw_spec in
function()
return streaming_parser ""
end
do
handle_spec(raw_spec)
end

if parse_failures > 0 then
return Result.failure(("Failed to parse %d packages."):format(parse_failures))
end
Expand Down

0 comments on commit 49ff59a

Please sign in to comment.