update_dart_sdk.ps1: Ensure Start-BitsTransfer always throws an exception in case of errors (#65929)

This commit is contained in:
Niklas Schulze
2020-09-18 00:22:13 +02:00
committed by GitHub
parent e0ac5da164
commit 580a96f957

View File

@@ -57,7 +57,7 @@ $dartSdkZip = "$cachePath\$dartZipName"
Try {
Import-Module BitsTransfer
Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip -ErrorAction Stop
}
Catch {
Write-Host "Downloading the Dart SDK using the BITS service failed, retrying with WebRequest..."