|
47 | 47 | .PARAMETER Verbose |
48 | 48 | Displays diagnostics information. |
49 | 49 | .PARAMETER AzureFeed |
50 | | - Default: https://dotnetcli.azureedge.net/dotnet |
| 50 | + Default: https://builds.dotnet.microsoft.com/dotnet |
51 | 51 | This parameter typically is not changed by the user. |
52 | 52 | It allows to change URL for the Azure feed used by this installer. |
53 | 53 | .PARAMETER UncachedFeed |
|
68 | 68 | [switch]$SharedRuntime, |
69 | 69 | [switch]$DryRun, |
70 | 70 | [switch]$NoPath, |
71 | | - [string]$AzureFeed="https://dotnetcli.azureedge.net/dotnet", |
| 71 | + [string]$AzureFeed="https://builds.dotnet.microsoft.com/dotnet", |
| 72 | + [string]$FallbackAzureFeed="https://dotnetcli.azureedge.net/dotnet", |
72 | 73 | [string]$UncachedFeed="https://dotnetcli.blob.core.windows.net/dotnet", |
73 | 74 | [string]$ProxyAddress, |
74 | 75 | [switch]$ProxyUseDefaultCredentials |
@@ -446,12 +447,14 @@ function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot, [string]$BinFolde |
446 | 447 | $CLIArchitecture = Get-CLIArchitecture-From-Architecture $Architecture |
447 | 448 | $SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $AzureFeed -Channel $Channel -Version $Version |
448 | 449 | $DownloadLink = Get-Download-Link -AzureFeed $AzureFeed -Channel $Channel -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture |
| 450 | +$FallbackDownloadLink = Get-Download-Link -AzureFeed $FallbackAzureFeed -Channel $Channel -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture |
449 | 451 | $LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $AzureFeed -Channel $Channel -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture |
450 | 452 |
|
451 | 453 | if ($DryRun) { |
452 | 454 | Say "Payload URLs:" |
453 | 455 | Say "Primary - $DownloadLink" |
454 | 456 | Say "Legacy - $LegacyDownloadLink" |
| 457 | + Say "Fallback - $FallbackDownloadLink" |
455 | 458 | Say "Repeatable invocation: .\$($MyInvocation.MyCommand) -Version $SpecificVersion -Channel $Channel -Architecture $CLIArchitecture -InstallDir $InstallDir" |
456 | 459 | exit 0 |
457 | 460 | } |
@@ -484,12 +487,21 @@ try { |
484 | 487 | DownloadFile -Uri $DownloadLink -OutPath $ZipPath |
485 | 488 | } |
486 | 489 | catch { |
487 | | - Say "Cannot download: $DownloadLink" |
488 | | - $DownloadLink = $LegacyDownloadLink |
489 | | - $ZipPath = [System.IO.Path]::GetTempFileName() |
490 | | - Say-Verbose "Legacy zip path: $ZipPath" |
491 | | - Say "Downloading legacy link: $DownloadLink" |
492 | | - DownloadFile -Uri $DownloadLink -OutPath $ZipPath |
| 490 | + try { |
| 491 | + Say "Cannot download: $DownloadLink" |
| 492 | + $DownloadLink = $FallbackDownloadLink |
| 493 | + $ZipPath = [System.IO.Path]::GetTempFileName() |
| 494 | + Say-Verbose "Fallabck zip path: $ZipPath" |
| 495 | + Say "Downloading fallback link: $FallbackDownloadLink" |
| 496 | + DownloadFile -Uri $FallbackDownloadLink -OutPath $ZipPath |
| 497 | + } catch { |
| 498 | + Say "Cannot download: $FallbackDownloadLink" |
| 499 | + $DownloadLink = $LegacyDownloadLink |
| 500 | + $ZipPath = [System.IO.Path]::GetTempFileName() |
| 501 | + Say-Verbose "Legacy zip path: $ZipPath" |
| 502 | + Say "Downloading legacy link: $DownloadLink" |
| 503 | + DownloadFile -Uri $DownloadLink -OutPath $ZipPath |
| 504 | + } |
493 | 505 | } |
494 | 506 |
|
495 | 507 | Say "Extracting zip from $DownloadLink" |
|
0 commit comments