]> Cypherpunks repositories - gostls13.git/commit
go/build: allow ~ in middle of path, just not at beginning
authorJonathan Nieder <jrn@google.com>
Fri, 15 Mar 2013 03:59:49 +0000 (23:59 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 15 Mar 2013 03:59:49 +0000 (23:59 -0400)
commit392d5feb8b359dce5120e4b9ee3743433c1cca6b
tree23b5348eae4fe9881f56f10ae2ec7c0a547fcec7
parentb12c299a5cef14c9673f6ee944cd0ec425a6bd5c
go/build: allow ~ in middle of path, just not at beginning

CL 7799045 relaxed the restriction in cmd/go on ~ in GOPATH
to allow paths with ~ in the middle while continuing to
protect against the common mistake of using GOPATH='~/home'
instead of GOPATH=~/home.  Unfortunately go/build still
filters these paths out:

        $ GOPATH=/tmp/test~ing go build
        test.go:22:2: cannot find package "test" in any of:
                /usr/lib/go/test (from $GOROOT)
                ($GOPATH not set)

So relax the requirement in go/build, too.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7826043
src/pkg/go/build/build.go