Skip to content

Commit 1161409

Browse files
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 <[email protected]>
1 parent 23faecf commit 1161409

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

images/image.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func (image *Image) Size(ctx context.Context, provider content.Provider, platfor
119119
}
120120
size += desc.Size
121121
return nil, nil
122-
}), FilterPlatforms(ChildrenHandler(provider), platform)), image.Target)
122+
}), LimitManifests(FilterPlatforms(ChildrenHandler(provider), platform), platform, 1)), image.Target)
123123
}
124124

125125
type platformManifest struct {

0 commit comments

Comments
 (0)