From b4144c7a304d55bc6241e4a576c51f48abbb869a Mon Sep 17 00:00:00 2001 From: William Boman Date: Wed, 6 Oct 2021 10:41:42 +0200 Subject: windows: add -UseBasicParsing for iwr calls Because otherwise it... tries to.. use Internet Explorer?? --- lua/nvim-lsp-installer/installers/context.lua | 2 +- lua/nvim-lsp-installer/installers/shell.lua | 2 +- lua/nvim-lsp-installer/installers/std.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lua') diff --git a/lua/nvim-lsp-installer/installers/context.lua b/lua/nvim-lsp-installer/installers/context.lua index 08276afb..e75f089d 100644 --- a/lua/nvim-lsp-installer/installers/context.lua +++ b/lua/nvim-lsp-installer/installers/context.lua @@ -33,7 +33,7 @@ local function fetch(url, callback) if platform.is_win then local ps_script = { "$ProgressPreference = 'SilentlyContinue'", - ("Write-Output (iwr -Uri %q).Content"):format(url), + ("Write-Output (iwr -UseBasicParsing -Uri %q).Content"):format(url), } table.insert( job_variants, diff --git a/lua/nvim-lsp-installer/installers/shell.lua b/lua/nvim-lsp-installer/installers/shell.lua index 0e57cf0d..752a216c 100644 --- a/lua/nvim-lsp-installer/installers/shell.lua +++ b/lua/nvim-lsp-installer/installers/shell.lua @@ -78,7 +78,7 @@ function M.powershell(raw_script, opts) end function M.remote_powershell(url, opts) - return M.powershell(("iwr %q -useb | iex"):format(url), opts) + return M.powershell(("iwr -UseBasicParsing %q | iex"):format(url), opts) end function M.polyshell(raw_script, opts) diff --git a/lua/nvim-lsp-installer/installers/std.lua b/lua/nvim-lsp-installer/installers/std.lua index 07e28d16..bdd60eca 100644 --- a/lua/nvim-lsp-installer/installers/std.lua +++ b/lua/nvim-lsp-installer/installers/std.lua @@ -25,7 +25,7 @@ function M.download_file(url, out_file) on_finish = callback, } end, - win = shell.powershell(("iwr -Uri %q -OutFile %q"):format(url, out_file)), + win = shell.powershell(("iwr -UseBasicParsing -Uri %q -OutFile %q"):format(url, out_file)), } end -- cgit v1.2.3-70-g09d2