fix(client): skipnode utilization for PreCopy

Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Brandt Keller <43887158+brandtkeller@users.noreply.github.com>
pull/30902/head
Brandt Keller 4 months ago committed by GitHub
parent b07ab77da3
commit a18a52e898
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -459,7 +459,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 nil
return oras.SkipNode
}
mu.Lock()

Loading…
Cancel
Save