Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
Improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
robertgraeff committed Feb 21, 2022
1 parent 31f3ed6 commit 75e00cb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/imagevector.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,10 @@ func preventLossOfTargetVersionLabel(res1, res2 *cdv2.Resource) error {

if hasLabel1 && hasLabel2 && targetVersion1 != targetVersion2 {
tag := res2.IdentityObjectMeta.GetIdentity()[TagExtraIdentity]
return fmt.Errorf(`there is more than one image entry with name %q and tag %q. `+
`Only one entry for the same name-tag combination is supported. A solution might be to combine `+
`entries by using a range of target versions, for example: targetVersion: ">= 1.18, < 1.22"`,

return fmt.Errorf(`there is more than one target version expression specified for name %q and tag %q. `+
`A solution might be to combine the target version expressions by using a range, for example: `+
`targetVersion: ">= 1.18, < 1.22"`,
res2.Name, tag)
}

Expand Down

0 comments on commit 75e00cb

Please sign in to comment.