]> Cypherpunks repositories - gostls13.git/commitdiff
go/build: (*Tree).BinDir should not return path with / in it on windows
authorAlex Brainman <alex.brainman@gmail.com>
Thu, 22 Dec 2011 22:46:30 +0000 (09:46 +1100)
committerAlex Brainman <alex.brainman@gmail.com>
Thu, 22 Dec 2011 22:46:30 +0000 (09:46 +1100)
R=rsc
CC=golang-dev
https://golang.org/cl/5502064

src/pkg/go/build/path.go

index 5b4d9243e67a2c87d79516731e19a174d0adeda9..7a281800c2828afe57bdbe3cde1286b49f804d30 100644 (file)
@@ -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")