diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/mason-core/installer/registry/providers/cargo.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lua/mason-core/installer/registry/providers/cargo.lua b/lua/mason-core/installer/registry/providers/cargo.lua index af43db86..f4904b73 100644 --- a/lua/mason-core/installer/registry/providers/cargo.lua +++ b/lua/mason-core/installer/registry/providers/cargo.lua @@ -60,7 +60,14 @@ end function M.get_versions(purl) ---@type string? local repository_url = _.path({ "qualifiers", "repository_url" }, purl) + local rev = _.path({ "qualifiers", "rev" }, purl) if repository_url then + if rev == "true" then + -- When ?rev=true we're targeting a commit SHA. It's not feasible to retrieve all commit SHAs for a + -- repository so we fail instead. + return Result.failure "Unable to retrieve commit SHAs." + end + ---@type Result? local git_tags = _.cond { { |
