aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-registry/sources/github.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2025-05-19 05:58:01 +0200
committerGitHub <noreply@github.com>2025-05-19 05:58:01 +0200
commit3501b0f96d9f2f878b1947cf3614bc02d053a0c0 (patch)
tree5f9025e2df9652346fcd74b7186be1c5a6366367 /lua/mason-registry/sources/github.lua
parentfix(spawn): fix calling vim.fn when inside fast event loop on Windows (#1950) (diff)
downloadmason-3501b0f96d9f2f878b1947cf3614bc02d053a0c0.tar
mason-3501b0f96d9f2f878b1947cf3614bc02d053a0c0.tar.gz
mason-3501b0f96d9f2f878b1947cf3614bc02d053a0c0.tar.bz2
mason-3501b0f96d9f2f878b1947cf3614bc02d053a0c0.tar.lz
mason-3501b0f96d9f2f878b1947cf3614bc02d053a0c0.tar.xz
mason-3501b0f96d9f2f878b1947cf3614bc02d053a0c0.tar.zst
mason-3501b0f96d9f2f878b1947cf3614bc02d053a0c0.zip
fix(registry): ensure there's no duplicate registry entries (#1957)
Diffstat (limited to 'lua/mason-registry/sources/github.lua')
-rw-r--r--lua/mason-registry/sources/github.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/lua/mason-registry/sources/github.lua b/lua/mason-registry/sources/github.lua
index 5cc69023..597e7d84 100644
--- a/lua/mason-registry/sources/github.lua
+++ b/lua/mason-registry/sources/github.lua
@@ -171,6 +171,11 @@ function GitHubRegistrySource:serialize()
}
end
+---@param other GitHubRegistrySource
+function GitHubRegistrySource:is_same_location(other)
+ return self.spec.namespace == other.spec.namespace and self.spec.name == other.spec.name
+end
+
function GitHubRegistrySource:__tostring()
if self.spec.version then
return ("GitHubRegistrySource(repo=%s, version=%s)"):format(self.repo, self.spec.version)