From ffa49401aa5c854c93d97f2fb0d276c4b0bc7d39 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 6 Nov 2023 01:48:50 +0000 Subject: [PATCH] feat(windows): set libc=mvsc via User-Agent and query params --- _webi/webi-pwsh.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_webi/webi-pwsh.ps1 b/_webi/webi-pwsh.ps1 index 088699c..a724344 100644 --- a/_webi/webi-pwsh.ps1 +++ b/_webi/webi-pwsh.ps1 @@ -28,7 +28,7 @@ IF ($my_arch -eq "AMD64") { } } -$Env:WEBI_UA = "Windows/10 $my_arch" +$Env:WEBI_UA = "Windows/10+ $my_arch msvc" $exename = $args[0] # Switch to userprofile @@ -100,7 +100,7 @@ if ($exename -eq "-V" -or $exename -eq "--version" -or $exename -eq "version" -o # Fetch .ps1 # TODO detect formats -$PKG_URL = "$Env:WEBI_HOST/api/installers/$exename.ps1?formats=zip,exe,tar,git" +$PKG_URL = "$Env:WEBI_HOST/api/installers/$exename.ps1?formats=zip,exe,tar,git&libc=msvc" Write-Output "Downloading $PKG_URL" # Invoke-WebRequest -UserAgent "Windows amd64" "$PKG_URL" -OutFile ".\.local\tmp\$exename.install.ps1" & curl.exe -fsSL -A "$Env:WEBI_UA" "$PKG_URL" -o .\.local\tmp\$exename.install.ps1