diff --git a/internal/artifact/artifact.go b/internal/artifact/artifact.go index 2c28d76b613..6afdb160443 100644 --- a/internal/artifact/artifact.go +++ b/internal/artifact/artifact.go @@ -289,6 +289,17 @@ func New() Artifacts { func (artifacts Artifacts) List() []*Artifact { artifacts.lock.Lock() defer artifacts.lock.Unlock() + names := map[string]bool{} + for _, item := range artifacts.items { + if item.Name == "" { + continue + } + if names[item.Name] { + log.WithField("name", item.Name). + Warn("multiple artifacts with the same name: this may cause errors") + } + names[item.Name] = true + } return artifacts.items }