diff options
author | Bryan C. Mills <bcmills@google.com> | 2019-06-24 10:16:12 -0400 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2019-06-24 18:27:20 +0000 |
commit | 43e53beba53547f2846a18e373c9205ededc20d2 (patch) | |
tree | 2451b915a7daac56d56fb22a9e3bb97d812f6648 /src/cmd/go/internal/modfetch/coderepo_test.go | |
parent | fafc92d4a6756c00683513a21a8f055b01595792 (diff) | |
download | go-43e53beba53547f2846a18e373c9205ededc20d2.tar.gz go-43e53beba53547f2846a18e373c9205ededc20d2.zip |
cmd/go/internal/modfetch: treat a missing go.mod file as a “not exist” error
If we have found a repository at the requested version but it does not
contain a go.mod file in an appropriate subdirectory, then the module
with the given path does not exist at that version. Therefore, we
should report it with an error equivalent to os.ErrNotExist so that
modload.Query will continue to check other possible module paths.
Updates #27173
Change-Id: Ica73f4bb97f58e611a7f7d38183ee52fef5ee69a
Reviewed-on: https://go-review.googlesource.com/c/go/+/183618
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/cmd/go/internal/modfetch/coderepo_test.go')
-rw-r--r-- | src/cmd/go/internal/modfetch/coderepo_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/internal/modfetch/coderepo_test.go b/src/cmd/go/internal/modfetch/coderepo_test.go index bfb1dff3de1..5fc9bc34397 100644 --- a/src/cmd/go/internal/modfetch/coderepo_test.go +++ b/src/cmd/go/internal/modfetch/coderepo_test.go @@ -638,7 +638,7 @@ var latestTests = []struct { { vcs: "git", path: "github.com/rsc/vgotest1/subdir", - err: "missing github.com/rsc/vgotest1/subdir/go.mod at revision a08abb797a67", + err: "github.com/rsc/vgotest1/subdir@v0.0.0-20180219223237-a08abb797a67: invalid version: missing github.com/rsc/vgotest1/subdir/go.mod at revision a08abb797a67", }, { vcs: "mod", |