From f59a49d591e3311b030b57d2be488a6303a3747a Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 7 Aug 2017 15:50:31 +0200 Subject: internal/build: add GoTool and document why it uses GOROOT --- build/ci.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'build/ci.go') diff --git a/build/ci.go b/build/ci.go index e631d70ef..6fe03db71 100644 --- a/build/ci.go +++ b/build/ci.go @@ -250,10 +250,7 @@ func goTool(subcmd string, args ...string) *exec.Cmd { } func goToolArch(arch string, subcmd string, args ...string) *exec.Cmd { - gocmd := filepath.Join(runtime.GOROOT(), "bin", "go") - cmd := exec.Command(gocmd, subcmd) - cmd.Args = append(cmd.Args, args...) - + cmd := build.GoTool(subcmd, args...) if subcmd == "build" || subcmd == "install" || subcmd == "test" { // Go CGO has a Windows linker error prior to 1.8 (https://github.com/golang/go/issues/8756). // Work around issue by allowing multiple definitions for <1.8 builds. -- cgit v1.2.3