mirror of
https://github.com/golang/go
synced 2024-11-21 21:04:41 -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:
parent
034711ed76
commit
b0ef0294d2
@ -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")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user