mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-08-20 04:26:25 +00:00
feat(windows): set libc=mvsc via User-Agent and query params
This commit is contained in:
+2
-2
@@ -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 <whatever>.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
|
||||
|
||||
Reference in New Issue
Block a user