mirror of
https://github.com/golang/go
synced 2024-11-26 01:07:57 -07: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.
This commit is contained in:
parent
333681d6a8
commit
6ba1d90df5
@ -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