Commit 62f401bf authored by marwan-at-work's avatar marwan-at-work Committed by Brad Fitzpatrick

cmd/go/internal/modfetch: do not panic when zip is incorrect

Fixes #26536

Change-Id: I75d284bd39af0a06e31d18c7f7745c5a8ecbe6ac
GitHub-Last-Rev: 88040a9edb0cb547a498cb8c8b662eb8729eb8bf
GitHub-Pull-Request: golang/go#26537
Reviewed-on: https://go-review.googlesource.com/125436Reviewed-by: 's avatarDaniel Martí <mvdan@mvdan.cc>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 30d7e644
......@@ -90,7 +90,6 @@ func downloadZip(mod module.Version, target string) error {
// Double-check zip file looks OK.
z, err := zip.OpenReader(tmpfile)
if err != nil {
z.Close()
return err
}
prefix := mod.Path + "@" + mod.Version
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment