]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix detection of unexpected files in downloaded zips
authorRuss Cox <rsc@golang.org>
Tue, 13 Nov 2018 14:28:33 +0000 (09:28 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 16 Nov 2018 17:49:55 +0000 (17:49 +0000)
commitf53a98685664e5157977c92651bc99b1f0418db5
tree601fc8a9b6d24e2f01de7e2cc36a6e4aba465c11
parent69010963aa233b7b2762762595ae230692b1c724
cmd/go: fix detection of unexpected files in downloaded zips

A bug in the old code was indirectly causing a confusing print,
but CL 131635 fixed the print instead of the surrounding code.
Fix the surrounding code, restore the old print, and test that the
error is actually reported (it was being ignored in a direct go get
but displaying in go build).

Change-Id: I03c21380fce481060c443b0cc820f3617497fdd9
Reviewed-on: https://go-review.googlesource.com/c/149317
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/modfetch/fetch.go
src/cmd/go/internal/modget/get.go
src/cmd/go/proxy_test.go
src/cmd/go/testdata/mod/rsc.io_badzip_v1.0.0.txt [new file with mode: 0644]
src/cmd/go/testdata/script/mod_load_badzip.txt [new file with mode: 0644]