diff options
| author | William Boman <william@redwill.se> | 2022-09-14 14:40:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-14 12:40:38 +0000 |
| commit | 07d949a21aff4c8a379a36ac3e457027efe3a1fe (patch) | |
| tree | 647563e13e936095bc49b94979317c30ec4a5081 /lua/mason-core/managers/github | |
| parent | chore: update generated code (#416) (diff) | |
| download | mason-07d949a21aff4c8a379a36ac3e457027efe3a1fe.tar mason-07d949a21aff4c8a379a36ac3e457027efe3a1fe.tar.gz mason-07d949a21aff4c8a379a36ac3e457027efe3a1fe.tar.bz2 mason-07d949a21aff4c8a379a36ac3e457027efe3a1fe.tar.lz mason-07d949a21aff4c8a379a36ac3e457027efe3a1fe.tar.xz mason-07d949a21aff4c8a379a36ac3e457027efe3a1fe.tar.zst mason-07d949a21aff4c8a379a36ac3e457027efe3a1fe.zip | |
fix(r-languageserver): use github releases as version source (#417)
Diffstat (limited to 'lua/mason-core/managers/github')
| -rw-r--r-- | lua/mason-core/managers/github/init.lua | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/lua/mason-core/managers/github/init.lua b/lua/mason-core/managers/github/init.lua index b406f0f9..a3cbd103 100644 --- a/lua/mason-core/managers/github/init.lua +++ b/lua/mason-core/managers/github/init.lua @@ -49,19 +49,37 @@ local function with_tag_receipt(repo, tag) end ---@async ----@param opts {repo: string, version: Optional?, asset_file: string|fun(release: string):string} -function M.release_file(opts) +---@param opts {repo: string, version: Optional?} +function M.release_version(opts) local ctx = installer.context() + ---@type string local release = _.coalesce(opts.version, ctx.requested_version):or_else_get(function() return client .fetch_latest_release(opts.repo) :map(_.prop "tag_name") :get_or_throw "Failed to fetch latest release from GitHub API. Refer to :h mason-errors-github-api for more information." end) + |
