Don't concatenate u.Path and tag if tag is already in OCI URI

Signed-off-by: Fabian B <fabian.baumanis@mailbox.org>
pull/13467/head
Fabian B 10 months ago
parent ecc4adee69
commit 8c98832799

@ -171,7 +171,11 @@ func (c *ChartDownloader) getOciURI(ref, version string, u *url.URL) (*url.URL,
} }
} }
u.Path = fmt.Sprintf("%s:%s", u.Path, tag) // If the tag is already inside the OCI URI, don't concatenate u.Path with tag.
// Otherwise the tag gets invalid.
if !(strings.Contains(u.Path, ":"+tag)) {
u.Path = fmt.Sprintf("%s:%s", u.Path, tag)
}
return u, err return u, err
} }

Loading…
Cancel
Save