packer: In the case of an error, close stdout/stderr writers
This commit is contained in:
parent
b64a2532f4
commit
7472bbb17c
|
@ -65,6 +65,8 @@ type Communicator interface {
|
||||||
func (r *RemoteCmd) StartWithUi(c Communicator, ui Ui) error {
|
func (r *RemoteCmd) StartWithUi(c Communicator, ui Ui) error {
|
||||||
stdout_r, stdout_w := io.Pipe()
|
stdout_r, stdout_w := io.Pipe()
|
||||||
stderr_r, stderr_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
|
// Set the writers for the output so that we get it streamed to us
|
||||||
if r.Stdout == nil {
|
if r.Stdout == nil {
|
||||||
|
|
Loading…
Reference in New Issue