Skip to content

Commit

Permalink
fix: multiple files with same name warning (#3660)
Browse files Browse the repository at this point in the history
the warning was too trigger happy, this should fix it.

thanks @ioga for reporting it.

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Dec 23, 2022
1 parent 8985606 commit 46fdb55
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/artifact/artifact.go
Expand Up @@ -294,11 +294,12 @@ func (artifacts Artifacts) List() []*Artifact {
if item.Name == "" {
continue
}
if names[item.Name] {
plat := item.Goos + item.Goarch + item.Goarm + item.Gomips + item.Goamd64
if names[item.Name+"_"+plat] {
log.WithField("name", item.Name).
Warn("multiple artifacts with the same name: this may cause errors")
}
names[item.Name] = true
names[item.Name+"_"+plat] = true
}
return artifacts.items
}
Expand Down

0 comments on commit 46fdb55

Please sign in to comment.