- Resolves issue with `Request-UnitySetupInstaller` not completing after all files finished downloading.

This commit is contained in:
Robert Onulak 2019-01-10 08:14:44 -08:00
Родитель 70edffbccf
Коммит 9cc8b4b19a
1 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -665,10 +665,11 @@ function Request-UnitySetupInstaller {
}
}
$totalDownloads = $global:downloadData.Count
# Showing progress of all file downloads
while ($global:downloadData.Count -gt 0) {
$totalDownloads = $global:downloadData.Count
do {
$installersDownloaded = 0
$global:downloadData.Keys | ForEach-Object {
$installerFileName = $_
$data = $global:downloadData[$installerFileName]
@ -720,7 +721,7 @@ function Request-UnitySetupInstaller {
-PercentComplete $progress `
-Id $data.downloadIndex
}
}
} while ($installersDownloaded -lt $totalDownloads)
}
finally {
# If the script is stopped, e.g. Ctrl+C, we want to cancel any remaining downloads