From f3eaf9b8703db67ddae0c7979a1610d340d6d382 Mon Sep 17 00:00:00 2001 From: rigel rozanski Date: Tue, 20 Jun 2017 16:52:22 -0400 Subject: [PATCH] quickfix --- cli/helper.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cli/helper.go b/cli/helper.go index 8bdb9e496..845c17dbf 100644 --- a/cli/helper.go +++ b/cli/helper.go @@ -73,13 +73,13 @@ func RunCaptureWithArgs(cmd Executable, args []string, env map[string]string) (s go func() { var buf bytes.Buffer // io.Copy will end when we call reader.Close() below - io.Copy(&buf, *reader) + io.Copy(&buf, reader) stdC <- buf.String() }() - return stdC + return &stdC } - outC := copyStd(&rOut) - errC := copyStd(&rErr) + outC := copyStd(rOut) + errC := copyStd(rErr) // now run the command err = RunWithArgs(cmd, args, env) @@ -87,7 +87,7 @@ func RunCaptureWithArgs(cmd Executable, args []string, env map[string]string) (s // and grab the stdout to return wOut.Close() wErr.Close() - stdout = <-outC - stderr = <-errC + stdout = <-*outC + stderr = <-*errC return stdout, stderr, err }