diff options
author | Russ Cox <rsc@golang.org> | 2013-09-10 15:28:29 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2013-09-10 15:28:29 -0400 |
commit | c5776987de9b3db82a10594604fed70d2241f1b4 (patch) | |
tree | 40bbe2a92ed61b24f0e966c591a996d2ab923791 /src/cmd/go/test.bash | |
parent | f2bf3601385374aa375aca59b1278d3d9b750b5c (diff) | |
download | go-c5776987de9b3db82a10594604fed70d2241f1b4.tar.gz |
cmd/go: report correct directory for 'no version control'
The scan starts at the directory we care about and works
backward to the GOPATH root. The error should say the
original directory name, not the name of the GOPATH root.
Fixes issue 6175.
R=golang-dev, minux.ma
CC=golang-dev
https://codereview.appspot.com/13366050
Diffstat (limited to 'src/cmd/go/test.bash')
-rwxr-xr-x | src/cmd/go/test.bash | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cmd/go/test.bash b/src/cmd/go/test.bash index 52d2f0833..17358279c 100755 --- a/src/cmd/go/test.bash +++ b/src/cmd/go/test.bash @@ -139,6 +139,18 @@ if ! ./testgo test ./testdata/testimport/*.go; then ok=false fi +TEST version control error message includes correct directory +export GOPATH=$(pwd)/testdata/shadow/root1 +if ./testgo get -u foo 2>testdata/err; then + echo "go get -u foo succeeded unexpectedly" + ok=false +elif ! grep testdata/shadow/root1/src/foo testdata/err >/dev/null; then + echo "go get -u error does not mention shadow/root1/src/foo:" + cat testdata/err + ok=false +fi +unset GOPATH + # Test that without $GOBIN set, binaries get installed # into the GOPATH bin directory. TEST install into GOPATH |