From aaa913a484fb3789a5e13d4496d25a9d3c490024 Mon Sep 17 00:00:00 2001 From: Simon Jones Date: Tue, 13 Aug 2019 13:27:14 -0400 Subject: [PATCH] RunWithUi sets appropriate default for stderr buffer - The WinRM communicator requires that stderr is not nil - RunWithUi will set a default stderr buffer if none is specified in the command --- provisioner/windows-restart/provisioner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioner/windows-restart/provisioner.go b/provisioner/windows-restart/provisioner.go index 94299bba0..e9e99b20c 100644 --- a/provisioner/windows-restart/provisioner.go +++ b/provisioner/windows-restart/provisioner.go @@ -263,7 +263,7 @@ 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