Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>2019-07-29 21:24:40 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2019-07-29 21:24:40 +0300
commita0aae297d987e50d665a29af52bbb30493390a79 (patch)
tree1dd74b1903a5d46be9b942d87b06b706b63422da /eng/common/native
parentb5c0c831da328b8ab7b7283a38fa56baaa7ae380 (diff)
Update dependencies from https://github.com/dotnet/arcade build 20190729.1 (#15881)
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19379.1 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19379.1
Diffstat (limited to 'eng/common/native')
-rw-r--r--eng/common/native/CommonLibrary.psm133
1 files changed, 31 insertions, 2 deletions
diff --git a/eng/common/native/CommonLibrary.psm1 b/eng/common/native/CommonLibrary.psm1
index 7a34c7e8a42..2a08d5246e7 100644
--- a/eng/common/native/CommonLibrary.psm1
+++ b/eng/common/native/CommonLibrary.psm1
@@ -59,9 +59,38 @@ function DownloadAndExtract {
-Verbose:$Verbose
if ($UnzipStatus -Eq $False) {
- Write-Error "Unzip failed"
- return $False
+ # Retry Download one more time with Force=true
+ $DownloadRetryStatus = CommonLibrary\Get-File -Uri $Uri `
+ -Path $TempToolPath `
+ -DownloadRetries 1 `
+ -RetryWaitTimeInSeconds $RetryWaitTimeInSeconds `
+ -Force:$True `
+ -Verbose:$Verbose
+
+ if ($DownloadRetryStatus -Eq $False) {
+ Write-Error "Last attempt of download failed as well"
+ return $False
+ }
+
+ # Retry unzip again one more time with Force=true
+ $UnzipRetryStatus = CommonLibrary\Expand-Zip -ZipPath $TempToolPath `
+ -OutputDirectory $InstallDirectory `
+ -Force:$True `
+ -Verbose:$Verbose
+ if ($UnzipRetryStatus -Eq $False)
+ {
+ Write-Error "Last attempt of unzip failed as well"
+ # Clean up partial zips and extracts
+ if (Test-Path $TempToolPath) {
+ Remove-Item $TempToolPath -Force
+ }
+ if (Test-Path $InstallDirectory) {
+ Remove-Item $InstallDirectory -Force -Recurse
+ }
+ return $False
+ }
}
+
return $True
}