Skip to content

Commit

Permalink
fix(package): support older receipt structures (#1520)
Browse files Browse the repository at this point in the history
  • Loading branch information
williamboman committed Nov 8, 2023
1 parent 5e513da commit 013c513
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/mason-core/package/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,11 @@ function Package:get_installed_version()
:and_then(
---@param receipt InstallReceipt
function(receipt)
return Purl.parse(receipt.primary_source.id):map(_.prop "version"):ok()
if receipt.primary_source.id then
return Purl.parse(receipt.primary_source.id):map(_.prop "version"):ok()
else
return Optional.empty()
end
end
)
:or_else(nil)
Expand Down

0 comments on commit 013c513

Please sign in to comment.