Skip to content

Commit

Permalink
Merge pull request #10257 from akhilerm/fix-unknown-platform
Browse files Browse the repository at this point in the history
core/image: fix usage of "unknown" platform
  • Loading branch information
dmcgowan committed May 23, 2024
2 parents ccc41e6 + 65024e6 commit 45e3091
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/images/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ func Platforms(ctx context.Context, provider content.Provider, image ocispec.Des
var platformSpecs []ocispec.Platform
return platformSpecs, Walk(ctx, Handlers(HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) {
if desc.Platform != nil {
if desc.Platform.OS == "unknown" || desc.Platform.Architecture == "unknown" {
return nil, ErrSkipDesc
}
platformSpecs = append(platformSpecs, *desc.Platform)
return nil, ErrSkipDesc
}
Expand Down

0 comments on commit 45e3091

Please sign in to comment.