From 1161409779f0275f5e65a697d587ff893f9f9188 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Fri, 2 Aug 2019 18:40:35 -0700 Subject: [PATCH] Limit multiple platform manifests to one for size check client.Pull will only pull one matching platform by default. When checking the size of image we match that behavior so that we don't look for multiple platforms that might not exist on disk. Signed-off-by: Darren Shepherd --- images/image.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/image.go b/images/image.go index 81c92ee4f..7d4f39c0a 100644 --- a/images/image.go +++ b/images/image.go @@ -119,7 +119,7 @@ func (image *Image) Size(ctx context.Context, provider content.Provider, platfor } size += desc.Size return nil, nil - }), FilterPlatforms(ChildrenHandler(provider), platform)), image.Target) + }), LimitManifests(FilterPlatforms(ChildrenHandler(provider), platform), platform, 1)), image.Target) } type platformManifest struct {