Commit a417e6f4 authored by Roger Peppe's avatar Roger Peppe

cmd/go: make vcs command actually gather output

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5577062
parent a3fdd6e6
...@@ -157,8 +157,8 @@ func (v *vcsCmd) run1(dir string, output bool, cmdline string, keyval []string) ...@@ -157,8 +157,8 @@ func (v *vcsCmd) run1(dir string, output bool, cmdline string, keyval []string)
var buf bytes.Buffer var buf bytes.Buffer
cmd.Stdout = &buf cmd.Stdout = &buf
cmd.Stderr = &buf cmd.Stderr = &buf
out := buf.Bytes()
err := cmd.Run() err := cmd.Run()
out := buf.Bytes()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "# cd %s; %s %s\n", dir, v.cmd, strings.Join(args, " ")) fmt.Fprintf(os.Stderr, "# cd %s; %s %s\n", dir, v.cmd, strings.Join(args, " "))
os.Stderr.Write(out) os.Stderr.Write(out)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment