diff --git a/pkg/chunked/storage_linux.go b/pkg/chunked/storage_linux.go index 7faccef1c1..5537bb13b3 100644 --- a/pkg/chunked/storage_linux.go +++ b/pkg/chunked/storage_linux.go @@ -241,6 +241,10 @@ func GetDiffer(ctx context.Context, store storage.Store, blobDigest digest.Diges return nil, err } + if !parseBooleanPullOption(&storeOpts, "convert_images", false) { + return nil, errors.New("convert_images not configured") + } + _, hasZstdChunkedTOC := annotations[internal.ManifestChecksumKey] _, hasEstargzTOC := annotations[estargz.TOCJSONDigestAnnotation] @@ -259,10 +263,6 @@ func GetDiffer(ctx context.Context, store storage.Store, blobDigest digest.Diges } func makeConvertFromRawDiffer(ctx context.Context, store storage.Store, blobDigest digest.Digest, blobSize int64, annotations map[string]string, iss ImageSourceSeekable, storeOpts *types.StoreOptions) (*chunkedDiffer, error) { - if !parseBooleanPullOption(storeOpts, "convert_images", false) { - return nil, errors.New("convert_images not configured") - } - layersCache, err := getLayersCache(store) if err != nil { return nil, err