diff options
Diffstat (limited to 'lua/nvim-lsp-installer/installers/gem.lua')
| -rw-r--r-- | lua/nvim-lsp-installer/installers/gem.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lua/nvim-lsp-installer/installers/gem.lua b/lua/nvim-lsp-installer/installers/gem.lua index 17f53620..091cda27 100644 --- a/lua/nvim-lsp-installer/installers/gem.lua +++ b/lua/nvim-lsp-installer/installers/gem.lua @@ -1,4 +1,5 @@ local path = require "nvim-lsp-installer.path" +local Data = require "nvim-lsp-installer.data" local process = require "nvim-lsp-installer.process" local installers = require "nvim-lsp-installer.installers" local std = require "nvim-lsp-installer.installers.std" @@ -15,6 +16,12 @@ function M.packages(packages) { "gem", "gem was not found in path, refer to https://wiki.openstack.org/wiki/RubyGems." }, }, function(server, callback, context) + local pkgs = Data.list_copy(packages or {}) + if context.requested_server_version then + -- The "head" package is the recipient for the requested version. It's.. by design... don't ask. + pkgs[1] = ("%s:%s"):format(pkgs[1], context.requested_server_version) + end + process.spawn(gem, { args = { "install", @@ -22,7 +29,7 @@ function M.packages(packages) "--install-dir=.", "--bindir=bin", "--no-document", - table.concat(packages, " "), + table.concat(pkgs, " "), }, cwd = server.root_dir, stdio_sink = context.stdio_sink, |
