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>
(cherry picked from commit a18a52e898)
pull/31037/head v3.18.1
Brandt Keller 4 months ago committed by Matt Farina
parent 4da701593f
commit f6f8700a53
No known key found for this signature in database
GPG Key ID: 92C44A3D421FF7F9

@ -490,7 +490,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