We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 762bcc2 commit 38c452fCopy full SHA for 38c452f
1 file changed
cmd/oras/root/cp.go
@@ -354,12 +354,12 @@ func platformMatches(a, b *ocispec.Platform) bool {
354
return false
355
}
356
357
- // Variant is optional, if one is empty, ignore comparison
+ // Variant is optional; only treat it as a mismatch if both variants are non-empty and different.
358
if a.Variant != "" && b.Variant != "" && a.Variant != b.Variant {
359
360
361
362
- // OSVersion is optional, if one is empty, ignore comparison
+ // OSVersion is optional; only treat it as a mismatch if both OSVersions are non-empty and different.
363
if a.OSVersion != "" && b.OSVersion != "" && a.OSVersion != b.OSVersion {
364
365
0 commit comments