Skip to content

Commit

Permalink
Merge pull request #92 from machecazzon/patch-1
Browse files Browse the repository at this point in the history
SPIKE: fix pullImage for when source already contains digest
  • Loading branch information
mpermar authored Nov 4, 2024
2 parents 40dea82 + 364aa52 commit f48425b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/chartutils/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,10 @@ func getImageLayoutDir(imagesDir string, dgst imagelock.DigestInfo) string {

func pullImage(image string, digest imagelock.DigestInfo, imagesDir string, o crane.Options) (string, error) {
imgDir := getImageLayoutDir(imagesDir, digest)

src := fmt.Sprintf("%s@%s", image, digest.Digest)
if strings.Contains(image, string(digest.Digest)) {

Check failure on line 292 in pkg/chartutils/images.go

View workflow job for this annotation

GitHub Actions / Validate

undefined: strings
src = image
}
ref, err := name.ParseReference(src, o.Name...)
if err != nil {
return "", fmt.Errorf("parsing reference %q: %w", src, err)
Expand Down

0 comments on commit f48425b

Please sign in to comment.