diff options
| author | William Boman <william@redwill.se> | 2022-04-21 12:09:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-21 12:09:59 +0200 |
| commit | b68fcc6bb2c770495ff8e2508c06dfdd49abcc80 (patch) | |
| tree | df7c71efb59958deb21a18eeccf3e3c43c4cd704 /lua/nvim-lsp-installer/servers/puppet/init.lua | |
| parent | run autogen_metadata.lua (diff) | |
| download | mason-b68fcc6bb2c770495ff8e2508c06dfdd49abcc80.tar mason-b68fcc6bb2c770495ff8e2508c06dfdd49abcc80.tar.gz mason-b68fcc6bb2c770495ff8e2508c06dfdd49abcc80.tar.bz2 mason-b68fcc6bb2c770495ff8e2508c06dfdd49abcc80.tar.lz mason-b68fcc6bb2c770495ff8e2508c06dfdd49abcc80.tar.xz mason-b68fcc6bb2c770495ff8e2508c06dfdd49abcc80.tar.zst mason-b68fcc6bb2c770495ff8e2508c06dfdd49abcc80.zip | |
chore: refactor remaining installers to async impl (#616)
Diffstat (limited to 'lua/nvim-lsp-installer/servers/puppet/init.lua')
| -rw-r--r-- | lua/nvim-lsp-installer/servers/puppet/init.lua | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/lua/nvim-lsp-installer/servers/puppet/init.lua b/lua/nvim-lsp-installer/servers/puppet/init.lua index 09842f30..9d302c2e 100644 --- a/lua/nvim-lsp-installer/servers/puppet/init.lua +++ b/lua/nvim-lsp-installer/servers/puppet/init.lua @@ -1,7 +1,6 @@ local server = require "nvim-lsp-installer.server" -local context = require "nvim-lsp-installer.installers.context" -local std = require "nvim-lsp-installer.installers.std" local process = require "nvim-lsp-installer.process" +local github = require "nvim-lsp-installer.core.managers.github" return function(name, root_dir) return server.Server:new { @@ -9,17 +8,15 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/puppetlabs/puppet-editor-services", languages = { "puppet" }, - installer = { - context.use_github_release_file("puppetlabs/puppet-editor-services", function(version) - return ("puppet_editor_services_%s.zip"):format(version) - end), - context.capture(function(ctx) - return std.unzip_remote(ctx.github_release_file) - end), - context.receipt(function(receipt, ctx) - receipt:with_primary_source(receipt.github_release_file(ctx)) - end), - }, + async = true, + installer = function() + github.unzip_release_file({ + repo = "puppetlabs/puppet-editor-services", + asset_file = function(version) + return ("puppet_editor_services_%s.zip"):format(version) + end, + }).with_receipt() + end, default_options = { cmd_env = { PATH = process.extend_path { root_dir }, |
