diff options
| author | William Boman <william@redwill.se> | 2025-05-19 05:58:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-19 05:58:01 +0200 |
| commit | 3501b0f96d9f2f878b1947cf3614bc02d053a0c0 (patch) | |
| tree | 5f9025e2df9652346fcd74b7186be1c5a6366367 /lua/mason-registry/sources/file.lua | |
| parent | fix(spawn): fix calling vim.fn when inside fast event loop on Windows (#1950) (diff) | |
| download | mason-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/file.lua')
| -rw-r--r-- | lua/mason-registry/sources/file.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lua/mason-registry/sources/file.lua b/lua/mason-registry/sources/file.lua index 34c855c0..663efaaa 100644 --- a/lua/mason-registry/sources/file.lua +++ b/lua/mason-registry/sources/file.lua @@ -189,6 +189,11 @@ function FileRegistrySource:serialize() } end +---@param other FileRegistrySource +function FileRegistrySource:is_same_location(other) + return vim.fn.expand(self.spec.path) == vim.fn.expand(other.spec.path) +end + function FileRegistrySource:__tostring() return ("FileRegistrySource(path=%s)"):format(self.spec.path) end |
