Skip to content

Commit

Permalink
Ensure that the tag suffix is only added when it is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
johscheuer committed Feb 5, 2025
1 parent 41d9927 commit 2de45c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions e2e/fixtures/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,12 @@ func getTagSuffix(isSidecar bool) string {
// getTagWithSuffix returns the tag with the required suffix if the image is needed for the sidecar image.
func getTagWithSuffix(tag string, isSidecar bool) string {
if tag != "" && isSidecar {
tagSuffix := getTagSuffix(isSidecar)
// Suffix is already present, so we don't have to add it again.
if strings.HasSuffix(tag, tagSuffix) {
return tag
}

return tag + getTagSuffix(isSidecar)
}

Expand Down

0 comments on commit 2de45c9

Please sign in to comment.