From: Bryan C. Mills Date: Fri, 15 Nov 2019 17:29:04 +0000 (-0500) Subject: cmd/dist: when -compile-only is set, write binaries to os.DevNull X-Git-Tag: go1.14beta1~191 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e1fa96049358737b138425918ce8d4a1f25ffd70;p=gostls13.git cmd/dist: when -compile-only is set, write binaries to os.DevNull Previously, we were writing binaries to GOROOT without ever reading them. Updates #28387 Change-Id: Ic84999f46a367fcbf2ae1eac8bfdcbceb24dc748 Reviewed-on: https://go-review.googlesource.com/c/go/+/207342 Run-TryBot: Bryan C. Mills Reviewed-by: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index 2a452f0453..17c875cfe8 100644 --- a/src/cmd/dist/test.go +++ b/src/cmd/dist/test.go @@ -748,7 +748,7 @@ func (t *tester) registerTests() { heading: "API check", fn: func(dt *distTest) error { if t.compileOnly { - t.addCmd(dt, "src", "go", "build", filepath.Join(goroot, "src/cmd/api/run.go")) + t.addCmd(dt, "src", "go", "build", "-o", os.DevNull, filepath.Join(goroot, "src/cmd/api/run.go")) return nil } t.addCmd(dt, "src", "go", "run", filepath.Join(goroot, "src/cmd/api/run.go"))