gobuild: pass-through stdout to 'go' command invocation (#2044)

When trying to compile tests in a package that does not contain tests
'go' emits an error message on stdout instead of stderr. Let the 'go'
command write to stdout too.

Fixes #2042
This commit is contained in:
Alessandro Arzilli 2020-05-11 18:44:25 +02:00 committed by GitHub
parent 0f83fa66f5
commit f559c3c421
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -68,5 +68,6 @@ func gocommand(command string, args ...string) error {
allargs = append(allargs, args...) allargs = append(allargs, args...)
goBuild := exec.Command("go", allargs...) goBuild := exec.Command("go", allargs...)
goBuild.Stderr = os.Stderr goBuild.Stderr = os.Stderr
goBuild.Stdout = os.Stdout
return goBuild.Run() return goBuild.Run()
} }