Skip to content

Commit

Permalink
added --insecure flag
Browse files Browse the repository at this point in the history
- added --insecure flag to prevent errors when downloading the client via curl #629
  • Loading branch information
amd64fox committed Sep 15, 2024
1 parent 27f1485 commit 6dca82a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ function downloadSp() {

try {
if ($curl_check) {
$stcode = curl.exe -Is -w "%{http_code} \n" -o /dev/null $web_Url --retry 2 --ssl-no-revoke
$stcode = curl.exe -Is -w "%{http_code} \n" -o /dev/null -k $web_Url --retry 2 --ssl-no-revoke
if ($stcode.trim() -ne "200") {
Write-Host "Curl error code: $stcode"; throw
}
Expand All @@ -486,7 +486,7 @@ function downloadSp() {
}
if (!($curl_check ) -and $null -ne (Get-Module -Name BitsTransfer -ListAvailable)) {
$ProgressPreference = 'Continue'
Start-BitsTransfer -Source $web_Url -Destination $local_Url -DisplayName ($lang).Download5 -Description "$online "
Start-BitsTransfer -Source -k $web_Url -Destination $local_Url -DisplayName ($lang).Download5 -Description "$online "
return
}
if (!($curl_check ) -and $null -eq (Get-Module -Name BitsTransfer -ListAvailable)) {
Expand All @@ -505,11 +505,11 @@ function downloadSp() {
try {

if ($curl_check) {
$stcode = curl.exe -Is -w "%{http_code} \n" -o /dev/null $web_Url --retry 2 --ssl-no-revoke
$stcode = curl.exe -Is -w "%{http_code} \n" -o /dev/null -k $web_Url --retry 2 --ssl-no-revoke
if ($stcode.trim() -ne "200") {
Write-Host "Curl error code: $stcode"; throw
}
curl.exe -q $web_Url -o $local_Url --progress-bar --retry 3 --ssl-no-revoke
curl.exe -q -k $web_Url -o $local_Url --progress-bar --retry 3 --ssl-no-revoke
return
}
if (!($curl_check ) -and $null -ne (Get-Module -Name BitsTransfer -ListAvailable) -and !($curl_check )) {
Expand Down

0 comments on commit 6dca82a

Please sign in to comment.