diff --git a/src/pkg/go/build/path.go b/src/pkg/go/build/path.go index 5b4d9243e67..7a281800c28 100644 --- a/src/pkg/go/build/path.go +++ b/src/pkg/go/build/path.go @@ -57,7 +57,7 @@ func (t *Tree) PkgDir() string { func (t *Tree) BinDir() string { if t.Goroot { if gobin := os.Getenv("GOBIN"); gobin != "" { - return gobin + return filepath.Clean(gobin) } } return filepath.Join(t.Path, "bin")