Skip to content

Commit 9cc8b4b

Browse files
committed
- Resolves issue with Request-UnitySetupInstaller not completing after all files finished downloading.
1 parent 70edffb commit 9cc8b4b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

UnitySetup/UnitySetup.psm1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -665,10 +665,11 @@ function Request-UnitySetupInstaller {
665665
}
666666
}
667667

668+
# Showing progress of all file downloads
668669
$totalDownloads = $global:downloadData.Count
670+
do {
671+
$installersDownloaded = 0
669672

670-
# Showing progress of all file downloads
671-
while ($global:downloadData.Count -gt 0) {
672673
$global:downloadData.Keys | ForEach-Object {
673674
$installerFileName = $_
674675
$data = $global:downloadData[$installerFileName]
@@ -720,7 +721,7 @@ function Request-UnitySetupInstaller {
720721
-PercentComplete $progress `
721722
-Id $data.downloadIndex
722723
}
723-
}
724+
} while ($installersDownloaded -lt $totalDownloads)
724725
}
725726
finally {
726727
# If the script is stopped, e.g. Ctrl+C, we want to cancel any remaining downloads

0 commit comments

Comments
 (0)