cmd/go: error message for incorrect downloaded zip truncates last character of prefix #27478
Labels
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?$ go version
go version go1.11 linux/amd64
What did you do?
Created an incorrectly structured .zip file served up via GOPROXY. Noticed the error message regarding the proper file prefix within the zip is truncating the last character of the expected prefix name.
e.g.
zip for github.com/tdewolff/minify@v2.3.5+incompatibl has unexpected file
is missing the laste
inincompatible
I don't know why the source code is explicitly chopping off the last character - maybe it was assumed to be cleaning up a trailing slash:
https://github.com/golang/go/blob/master/src/cmd/go/internal/modfetch/fetch.go#L126
The text was updated successfully, but these errors were encountered: