diff --git a/provisioner/windows-restart/provisioner.go b/provisioner/windows-restart/provisioner.go index 94299bba0..bf44a2830 100644 --- a/provisioner/windows-restart/provisioner.go +++ b/provisioner/windows-restart/provisioner.go @@ -263,12 +263,11 @@ var waitForCommunicator = func(ctx context.Context, p *Provisioner) error { cmdKeyCheck.Stdout = &buf cmdKeyCheck.Stdout = io.MultiWriter(cmdKeyCheck.Stdout, &buf2) - err := p.comm.Start(ctx, cmdKeyCheck) + err := cmdKeyCheck.RunWithUi(ctx, p.comm, p.ui) if err != nil { log.Printf("Communication connection err: %s", err) shouldContinue = true } - cmdKeyCheck.Wait() stdoutToRead := buf2.String() if strings.Contains(stdoutToRead, "True") {