mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 11:51:07 +07:00
Fix Get-File in win32.ps1
This commit is contained in:
parent
1f8252a3ed
commit
c61bd0e074
@ -147,7 +147,8 @@ Function Get-File {
|
||||
}
|
||||
break;
|
||||
} catch {
|
||||
if ($i -eq ($Retries - 1) -and ($null -ne $FallbackUrl)) {
|
||||
if ($i -eq ($Retries - 1)) {
|
||||
if($FallbackUrl) {
|
||||
try {
|
||||
if($null -ne $OutFile) {
|
||||
Invoke-WebRequest -Uri $FallbackUrl -OutFile $OutFile -TimeoutSec $TimeoutSec
|
||||
@ -157,6 +158,9 @@ Function Get-File {
|
||||
} catch {
|
||||
throw "Failed to download the assets from $Url and $FallbackUrl"
|
||||
}
|
||||
} else {
|
||||
throw "Failed to download the assets from $Url"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user