]> Cypherpunks repositories - gostls13.git/commit
cmd/go: do not turn list ./nonexist into a network lookup
authorRuss Cox <rsc@golang.org>
Fri, 10 Aug 2018 20:28:48 +0000 (16:28 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 17 Aug 2018 19:22:03 +0000 (19:22 +0000)
commit64fae252868fe6ab97f743cfadcb54cee8ccca02
tree566984e073a5c5a7984a328d7c39d18ab1405c1c
parent8dd27b1864f334fa82e0ead5bd8b9448e295e316
cmd/go: do not turn list ./nonexist into a network lookup

If you're in a directory corresponding to x/y
and you run go list ./z, we do at some point
want to turn that into x/y/z. But if ./z does
not exist that will make the go command
check the network to see if it can find x/y/z.
That's clearly wrong: ./z means that directory,
nothing else. And it turns a typo into a long delay,
which is even worse.

Fixes #26874.

Change-Id: Iec15fa7b359af11b6a4fc6cb082e593658fb6e41
Reviewed-on: https://go-review.googlesource.com/129061
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
src/cmd/go/internal/modload/load.go
src/cmd/go/testdata/script/mod_fs_patterns.txt
src/cmd/go/testdata/script/mod_list_dir.txt