Skip to content

Commit

Permalink
restoring from main branch
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Bustamante <[email protected]>
  • Loading branch information
jjbustamante committed Apr 11, 2024
1 parent a0a34ed commit cedf3ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions layout/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ func newImageFromPath(path string, withPlatform imgutil.Platform) (v1.Image, err

// imageFromIndex creates a v1.Image from the given Image Index, selecting the image manifest
// that matches the given OS and architecture.
func imageFromIndex(v1Index v1.ImageIndex, platform imgutil.Platform) (v1.Image, error) {
manifestList, err := v1Index.IndexManifest()
func imageFromIndex(index v1.ImageIndex, platform imgutil.Platform) (v1.Image, error) {
manifestList, err := index.IndexManifest()
if err != nil {
return nil, err
}
Expand All @@ -169,7 +169,7 @@ func imageFromIndex(v1Index v1.ImageIndex, platform imgutil.Platform) (v1.Image,
return nil, fmt.Errorf("failed to find manifest matching platform %v", platform)
}

return v1Index.Image(manifest.Digest)
return index.Image(manifest.Digest)
}

// TODO move this code to something more generic
Expand Down

0 comments on commit cedf3ad

Please sign in to comment.