Update "duplicate tag" error message to include the tag list from both entries (for easier identification)

This commit is contained in:
Tianon Gravi 2017-01-24 12:54:44 -08:00
parent 0066f2058b
commit b3ac43e115
1 changed files with 2 additions and 2 deletions

View File

@ -156,8 +156,8 @@ func (manifest Manifest2822) GetTag(tag string) *Manifest2822Entry {
func (manifest *Manifest2822) AddEntry(entry Manifest2822Entry) error {
for _, tag := range entry.Tags {
if manifest.GetTag(tag) != nil {
return fmt.Errorf("Tags %q includes duplicate tag: %s", entry.TagsString(), tag)
if otherEntry := manifest.GetTag(tag); otherEntry != nil {
return fmt.Errorf("Tags %q includes duplicate tag %q (duplicated in %q)", entry.TagsString(), tag, otherEntry.TagsString())
}
}