1
0
mirror of https://github.com/golang/go synced 2024-11-21 16:04:45 -07:00

go/build: use GOBIN as binary path for GOROOT

Fixes #2106.

R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/4836047
This commit is contained in:
Andrew Gerrand 2011-08-01 19:17:23 -07:00
parent 034711ed76
commit b0ef0294d2

View File

@ -54,6 +54,11 @@ func (t *Tree) PkgDir() string {
// BinDir returns the tree's binary executable directory.
func (t *Tree) BinDir() string {
if t.Goroot {
if gobin := os.Getenv("GOBIN"); gobin != "" {
return gobin
}
}
return filepath.Join(t.Path, "bin")
}