mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-03 09:57:41 +08:00
Merge pull request #1144 from tonistiigi/nil-platform
imagetools: handle manifest with nil platform
This commit is contained in:
commit
1beb3359a6
@ -59,7 +59,9 @@ func NewPrinter(ctx context.Context, opt Opt, name string, format string) (*Prin
|
||||
switch manifest.MediaType {
|
||||
case images.MediaTypeDockerSchema2ManifestList, ocispecs.MediaTypeImageIndex:
|
||||
for _, m := range index.Manifests {
|
||||
pforms = append(pforms, *m.Platform)
|
||||
if m.Platform != nil {
|
||||
pforms = append(pforms, *m.Platform)
|
||||
}
|
||||
}
|
||||
default:
|
||||
pforms = append(pforms, platforms.DefaultSpec())
|
||||
|
Loading…
x
Reference in New Issue
Block a user