mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
index: gracefully handle duplicate module indexes (#1645)
* index: gracefully handle duplicate module indexes * fix memory impl
This commit is contained in:
@@ -74,7 +74,7 @@ func (s *stasher) Stash(ctx context.Context, mod, ver string) (string, error) {
|
||||
return "", errors.E(op, err)
|
||||
}
|
||||
err = s.indexer.Index(ctx, mod, v.Semver)
|
||||
if err != nil {
|
||||
if err != nil && !errors.Is(err, errors.KindAlreadyExists) {
|
||||
return "", errors.E(op, err)
|
||||
}
|
||||
return v.Semver, nil
|
||||
|
||||
Reference in New Issue
Block a user