From d2ec0c0070c01ba0e3e8926031cfe848a016df44 Mon Sep 17 00:00:00 2001 From: William Boman Date: Fri, 10 Sep 2021 13:38:39 +0200 Subject: rewrite some installers for broader cross-platform support (#85) - Remove all usage of zx in favour of native Lua (via libuv) - Introduce new set of `std` installers The following servers will have to be reinstalled due to this change: 1. clangd 2. solargraph 3. sumneko_lua 4. tailwindcss --- lua/nvim-lsp-installer/installers/shell.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lua/nvim-lsp-installer/installers/shell.lua') diff --git a/lua/nvim-lsp-installer/installers/shell.lua b/lua/nvim-lsp-installer/installers/shell.lua index dbf0c17a..ace1f814 100644 --- a/lua/nvim-lsp-installer/installers/shell.lua +++ b/lua/nvim-lsp-installer/installers/shell.lua @@ -52,6 +52,21 @@ function M.cmd(raw_script, opts) } end +function M.powershell(raw_script, opts) + local default_opts = { + env = {}, + -- YIKES https://stackoverflow.com/a/63301751 + prefix = "$ProgressPreference = 'SilentlyContinue';", + } + opts = vim.tbl_deep_extend("force", default_opts, opts or {}) + + return shell { + shell = "powershell.exe", + cmd = (opts.prefix or "") .. raw_script, + env = opts.env, + } +end + function M.polyshell(raw_script, opts) local default_opts = { env = {}, -- cgit v1.2.3-70-g09d2