From 7472bbb17c8940348833eb5275f23650209c813d Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 23 Jul 2013 22:46:51 -0500 Subject: [PATCH] packer: In the case of an error, close stdout/stderr writers --- packer/communicator.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packer/communicator.go b/packer/communicator.go index b16e2d348..ff992743f 100644 --- a/packer/communicator.go +++ b/packer/communicator.go @@ -65,6 +65,8 @@ type Communicator interface { func (r *RemoteCmd) StartWithUi(c Communicator, ui Ui) error { stdout_r, stdout_w := io.Pipe() stderr_r, stderr_w := io.Pipe() + defer stdout_w.Close() + defer stderr_w.Close() // Set the writers for the output so that we get it streamed to us if r.Stdout == nil {