diff --git a/cmd/oras/internal/meta/type.go b/cmd/oras/internal/meta/type.go index 43a9dd28d..20dad7097 100644 --- a/cmd/oras/internal/meta/type.go +++ b/cmd/oras/internal/meta/type.go @@ -90,5 +90,12 @@ func ToDescriptor(name string, desc ocispec.Descriptor) Descriptor { Data: desc.Data, ArtifactType: desc.ArtifactType, } + if desc.Platform != nil { + ret.Platform = &Platform{ + Architecture: desc.Platform.Architecture, + OS: desc.Platform.OS, + Variant: desc.Platform.Variant, + } + } return ret }