There was an error while loading. Please reload this page.
2 parents 377893c + 200b062 commit 92e9818Copy full SHA for 92e9818
1 file changed
tools/install-bin-windows.ps1
@@ -1,11 +1,11 @@
1
$ErrorActionPreference = 'Stop'
2
3
-[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
4
-Add-Type -AssemblyName System.Net.Http
5
function Invoke-DownloadWithRetry {
6
param([string]$Uri, [string]$OutFile, [int]$MaxRetries = 10, [int]$RetryDelay = 30)
7
for ($i = 1; $i -le ($MaxRetries + 1); $i++) {
8
try {
+ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
+ Add-Type -AssemblyName System.Net.Http
9
$f = [IO.File]::OpenWrite($OutFile)
10
[Net.Http.HttpClient]::new().GetStreamAsync($Uri).Result.CopyTo($f)
11
$f.Close()
0 commit comments