]> Cypherpunks repositories - gostls13.git/commit
cmd/go: allow go get with local path
authorSebastien Binet <seb.binet@gmail.com>
Fri, 27 Feb 2015 23:41:31 +0000 (00:41 +0100)
committerRob Pike <r@golang.org>
Mon, 23 Mar 2015 22:14:17 +0000 (22:14 +0000)
commitdb454afd2353364ad1c3bcd6002def81871ed2b2
tree078713db810df92dc6d26de014bcdd86f3cb4cdf
parentfc9a234d9f9814770f8572c321f24aeac2bfb1a1
cmd/go: allow go get with local path

Previously, running 'go get' with a local path would correctly
download the package but fail to install it.
This is because a sticky error - resulting from discovering that the
package needed to be downloaded - was still around.
Theoretically, such sticky errors would be cleared but they weren't
because the map tracking these errors were indexed with the correct
canonical import path of the package (e.g. "ex.com/x/pkg") whereas the
clearing was done with the local path (e.g. "./pkg".)

Always use the canonical import path.

Fixes #9767

Change-Id: Ia0e8a51ac591d4c833d11285da5b767ef7ed8ad2
Reviewed-on: https://go-review.googlesource.com/6266
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/go/get.go
src/cmd/go/test.bash