forward porting 30902

Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
pull/30905/head
Robert Sirchia 4 months ago
parent 52dddba759
commit 937c533e37
No known key found for this signature in database
GPG Key ID: C2D40F4D8196E874

@ -463,7 +463,7 @@ func (c *Client) Pull(ref string, options ...PullOption) (*PullResult, error) {
PreCopy: func(_ context.Context, desc ocispec.Descriptor) error {
mediaType := desc.MediaType
if i := sort.SearchStrings(allowedMediaTypes, mediaType); i >= len(allowedMediaTypes) || allowedMediaTypes[i] != mediaType {
return fmt.Errorf("media type %q is not allowed, found in descriptor with digest: %q", mediaType, desc.Digest)
return oras.SkipNode
}
mu.Lock()

Loading…
Cancel
Save