diff --git a/cli/registry/client/fetcher.go b/cli/registry/client/fetcher.go index 04f75ef34d56..acae274a4431 100644 --- a/cli/registry/client/fetcher.go +++ b/cli/registry/client/fetcher.go @@ -195,7 +195,10 @@ func pullManifestList(ctx context.Context, ref reference.Named, repo distributio case *ocischema.DeserializedManifest: imageManifest, err = pullManifestOCISchema(ctx, manifestRef, repo, *v) default: - return nil, errors.Errorf("unsupported manifest type: %T", manifest) + err = errors.Errorf("unsupported manifest type: %T", manifest) + } + if err != nil { + return nil, err } // Replace platform from config