Skip to content

Commit 92e9818

Browse files
authored
Merge branch 'main' into create-pull-request/patch
2 parents 377893c + 200b062 commit 92e9818

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/install-bin-windows.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
$ErrorActionPreference = 'Stop'
22

3-
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
4-
Add-Type -AssemblyName System.Net.Http
53
function Invoke-DownloadWithRetry {
64
param([string]$Uri, [string]$OutFile, [int]$MaxRetries = 10, [int]$RetryDelay = 30)
75
for ($i = 1; $i -le ($MaxRetries + 1); $i++) {
86
try {
7+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
8+
Add-Type -AssemblyName System.Net.Http
99
$f = [IO.File]::OpenWrite($OutFile)
1010
[Net.Http.HttpClient]::new().GetStreamAsync($Uri).Result.CopyTo($f)
1111
$f.Close()

0 commit comments

Comments
 (0)