aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/installers/shell.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/nvim-lsp-installer/installers/shell.lua')
-rw-r--r--lua/nvim-lsp-installer/installers/shell.lua15
1 files changed, 15 insertions, 0 deletions
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 = {},