Skip to content

Commit 3b469f0

Browse files
committed
job is async so ensure we wait for completion
1 parent 05007da commit 3b469f0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

helpful_tools/Install-DockerCE/uninstall-docker-ce.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -572,10 +572,10 @@ public class Hcs
572572

573573
# Wait for the job to complete with a reasonable timeout
574574
$timeout = 120 # 2 minutes
575-
if ($job | Wait-Job -Timeout $timeout)
575+
if (Wait-Job $job -Timeout $timeout)
576576
{
577-
$results = $job | Receive-Job
578-
$job | Remove-Job
577+
$results = Receive-Job $job
578+
Remove-Job $job
579579

580580
$successCount = ($results | Where-Object { $_.Success }).Count
581581
$failCount = ($results | Where-Object { -not $_.Success }).Count

0 commit comments

Comments
 (0)