mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-27 17:47:56 +08:00
BLD: Don't accept the download if we tried too many times
It's likely we have an incomplete file.
This commit is contained in:
@@ -33,12 +33,11 @@ function DownloadMiniconda ($python_version, $platform_suffix) {
|
||||
Start-Sleep 1
|
||||
}
|
||||
}
|
||||
if (Test-Path $filepath) {
|
||||
Write-Host "File saved at" $filepath
|
||||
} else {
|
||||
if (!(Test-Path $filepath) -or ($i -ge $retry_attempts)) {
|
||||
# Retry once to get the error message if any at the last try
|
||||
$webclient.DownloadFile($url, $filepath)
|
||||
}
|
||||
Write-Host "File saved at" $filepath
|
||||
return $filepath
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user