Permalink
Browse files

Forward stderr too

  • Loading branch information...
1 parent 4e77276 commit 90bf375bcbe9b19fe8cc9c5d066fe580004a16c7 @ryanslade committed Sep 24, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 goautotest.go
View
@@ -22,13 +22,21 @@ func startGoTest() {
os.Exit(1)
}
+ stderr, err := cmd.StderrPipe()
+ if err != nil {
+ fmt.Println(err)
+ os.Exit(1)
+ }
+
err = cmd.Start()
if err != nil {
fmt.Println(err)
os.Exit(1)
}
go io.Copy(os.Stdout, stdout)
+ go io.Copy(os.Stderr, stderr)
+
err = cmd.Wait()
if err != nil {
fmt.Println(err)

0 comments on commit 90bf375

Please sign in to comment.