1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

distribution: do not retry unsupported layer media types

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2021-10-25 14:20:03 +02:00
parent aef8e48172
commit 1cdad98a7a
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -466,7 +466,7 @@ func (pd *v2PushDescriptor) uploadUsingSession(
case schema2.MediaTypeLayer:
default:
reader.Close()
return distribution.Descriptor{}, fmt.Errorf("unsupported layer media type %s", m)
return distribution.Descriptor{}, xfer.DoNotRetry{Err: fmt.Errorf("unsupported layer media type %s", m)}
}
digester := digest.Canonical.Digester()