mirror of
https://github.com/golang/go
synced 2024-09-29 11:24:28 -06:00
cmd/go/internal/modfetch: report error on failing to derive pseudo version from recent tag
The current implementation ignores the error when it tries to get
the recent tag on revisions, which results in incorrect pseudo
version (v0.0.0-) is derived.
Fixes #53935
Change-Id: I153d851eb913fb7e40051e194c92b9ca5bf0e906
GitHub-Last-Rev: 6ba1d90df5
GitHub-Pull-Request: golang/go#54701
Reviewed-on: https://go-review.googlesource.com/c/go/+/426079
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
This commit is contained in:
parent
4029124cf4
commit
5cfeaed4de
@ -607,7 +607,10 @@ func (r *codeRepo) convert(info *codehost.RevInfo, statVers string) (*RevInfo, e
|
||||
return !isRetracted(v)
|
||||
}
|
||||
if pseudoBase == "" {
|
||||
tag, _ := r.code.RecentTag(info.Name, tagPrefix, tagAllowed)
|
||||
tag, err := r.code.RecentTag(info.Name, tagPrefix, tagAllowed)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tag != "" {
|
||||
pseudoBase, _ = tagToVersion(tag)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user