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