@@ -361,12 +361,18 @@ func TagInfoFromReferences(client *registryClient, opts *options.ManifestOptions
361
361
platforms := []string {}
362
362
363
363
for _ , ref := range references {
364
- platforms = append (platforms , ref .Platform .OS + "/" + ref .Platform .Architecture )
365
- logCtx .Tracef ("Found %s" , options .PlatformKey (ref .Platform .OS , ref .Platform .Architecture , ref .Platform .Variant ))
366
- if ! opts .WantsPlatform (ref .Platform .OS , ref .Platform .Architecture , ref .Platform .Variant ) {
364
+ var refOS , refArch , refVariant string
365
+ if ref .Platform != nil {
366
+ refOS = ref .Platform .OS
367
+ refArch = ref .Platform .Architecture
368
+ refVariant = ref .Platform .Variant
369
+ }
370
+ platforms = append (platforms , refOS + "/" + refArch )
371
+ logCtx .Tracef ("Found %s" , options .PlatformKey (refOS , refArch , refVariant ))
372
+ if ! opts .WantsPlatform (refOS , refArch , refVariant ) {
367
373
logCtx .Tracef ("Ignoring referenced manifest %v because platform %s does not match any of: %s" ,
368
374
ref .Digest ,
369
- options .PlatformKey (ref . Platform . OS , ref . Platform . Architecture , ref . Platform . Variant ),
375
+ options .PlatformKey (refOS , refArch , refVariant ),
370
376
strings .Join (opts .Platforms (), "," ))
371
377
continue
372
378
}
0 commit comments