diff options
| author | William Boman <william@redwill.se> | 2022-05-19 00:07:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-19 00:07:50 +0200 |
| commit | ec532c36eeed36ded785696727a85a9a00f71f22 (patch) | |
| tree | 69d7b97b34ab873fdf3c55b60b43c399f27b35ab /lua/nvim-lsp-installer/servers/erlangls/init.lua | |
| parent | run autogen_metadata.lua (diff) | |
| download | mason-ec532c36eeed36ded785696727a85a9a00f71f22.tar mason-ec532c36eeed36ded785696727a85a9a00f71f22.tar.gz mason-ec532c36eeed36ded785696727a85a9a00f71f22.tar.bz2 mason-ec532c36eeed36ded785696727a85a9a00f71f22.tar.lz mason-ec532c36eeed36ded785696727a85a9a00f71f22.tar.xz mason-ec532c36eeed36ded785696727a85a9a00f71f22.tar.zst mason-ec532c36eeed36ded785696727a85a9a00f71f22.zip | |
fix(erlangls): follow git tags (#708)
Closes #683.
Diffstat (limited to 'lua/nvim-lsp-installer/servers/erlangls/init.lua')
| -rw-r--r-- | lua/nvim-lsp-installer/servers/erlangls/init.lua | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lua/nvim-lsp-installer/servers/erlangls/init.lua b/lua/nvim-lsp-installer/servers/erlangls/init.lua index 96c5618c..2ae7403a 100644 --- a/lua/nvim-lsp-installer/servers/erlangls/init.lua +++ b/lua/nvim-lsp-installer/servers/erlangls/init.lua @@ -3,8 +3,8 @@ local path = require "nvim-lsp-installer.core.path" local process = require "nvim-lsp-installer.core.process" local platform = require "nvim-lsp-installer.core.platform" local std = require "nvim-lsp-installer.core.managers.std" -local github_client = require "nvim-lsp-installer.core.managers.github.client" local git = require "nvim-lsp-installer.core.managers.git" +local github = require "nvim-lsp-installer.core.managers.github" local Optional = require "nvim-lsp-installer.core.optional" return function(name, root_dir) @@ -20,14 +20,9 @@ return function(name, root_dir) std.ensure_executable(rebar3, { help_url = "http://rebar3.org/docs/" }) local repo = "erlang-ls/erlang_ls" - ctx.requested_version = ctx.requested_version:or_(function() - return Optional.of(github_client.fetch_latest_tag(repo) - :map(function(tag) - return tag.name - end) - :get_or_throw "Failed to fetch latest tag.") - end) - git.clone({ ("https://github.com/%s.git"):format(repo) }).with_receipt() + local source = github.tag { repo = repo } + source.with_receipt() + git.clone { ("https://github.com/%s.git"):format(repo), version = Optional.of(source.tag) } ctx.spawn[rebar3] { "escriptize" } ctx.spawn[rebar3] { "as", "dap", "escriptize" } |
