diff options
| author | William Boman <william@redwill.se> | 2021-11-11 16:17:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-11 16:17:06 +0100 |
| commit | c425ab9f384ef643ea6a669b5f546ac186ab2dd1 (patch) | |
| tree | d6ca968c819b5dc92ac8881812a9b98e806aa874 /lua | |
| parent | doc: update nvim-lspconfig links (diff) | |
| download | mason-c425ab9f384ef643ea6a669b5f546ac186ab2dd1.tar mason-c425ab9f384ef643ea6a669b5f546ac186ab2dd1.tar.gz mason-c425ab9f384ef643ea6a669b5f546ac186ab2dd1.tar.bz2 mason-c425ab9f384ef643ea6a669b5f546ac186ab2dd1.tar.lz mason-c425ab9f384ef643ea6a669b5f546ac186ab2dd1.tar.xz mason-c425ab9f384ef643ea6a669b5f546ac186ab2dd1.tar.zst mason-c425ab9f384ef643ea6a669b5f546ac186ab2dd1.zip | |
fsautocomplete: don't use shell as an intermediary (#258)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-lsp-installer/servers/fsautocomplete/init.lua | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/lua/nvim-lsp-installer/servers/fsautocomplete/init.lua b/lua/nvim-lsp-installer/servers/fsautocomplete/init.lua index 303ebec8..0b8176fb 100644 --- a/lua/nvim-lsp-installer/servers/fsautocomplete/init.lua +++ b/lua/nvim-lsp-installer/servers/fsautocomplete/init.lua @@ -1,7 +1,7 @@ local server = require "nvim-lsp-installer.server" local path = require "nvim-lsp-installer.path" +local process = require "nvim-lsp-installer.process" local std = require "nvim-lsp-installer.installers.std" -local shell = require "nvim-lsp-installer.installers.shell" return function(name, root_dir) return server.Server:new { @@ -11,9 +11,26 @@ return function(name, root_dir) homepage = "https://github.com/fsharp/FsAutoComplete", installer = { std.ensure_executables { - { "dotnet", "dotnet was not found in path." }, + { + "dotnet", + "dotnet was not found in path. Refer to https://dotnet.microsoft.com/download for installation instructions.", + }, }, - shell.polyshell [[dotnet tool update --tool-path . fsautocomplete]], + ---@type ServerInstallerFunction + function(_, callback, ctx) + process.spawn("dotnet", { + args = { "tool", "update", "--tool-path", ".", "fsautocomplete" }, + cwd = ctx.install_dir, + stdio_sink = ctx.stdio_sink, + }, function(success) + if not success then + ctx.stdio_sink.stderr "Failed to install fsautocomplete.\n" + callback(false) + else + callback(true) + end + end) + end, }, default_options = { cmd = { |
