You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add more strict verifications when user provides a platform (#336)
* more strict rules around platform verification
Signed-off-by: Alex Goodman <[email protected]>
* raise up platform mismatch error
Signed-off-by: Alex Goodman <[email protected]>
---------
Signed-off-by: Alex Goodman <[email protected]>
returnfmt.Errorf("image has unexpected architecture %q, which differs from the user specified architecture %q", platform.Architecture, p.platform.Architecture)
364
+
ifgiven.Architecture!=expected.Architecture {
365
+
returnnewErrPlatformMismatch(expected, fmt.Errorf("image has unexpected architecture %q, which differs from the user specified architecture %q", given.Architecture, expected.Architecture))
366
366
}
367
367
368
-
ifplatform.Variant!=p.platform.Variant {
369
-
returnfmt.Errorf("image has unexpected architecture %q, which differs from the user specified architecture %q", platform.Variant, p.platform.Variant)
368
+
ifgiven.Variant!=expected.Variant {
369
+
returnnewErrPlatformMismatch(expected, fmt.Errorf("image has unexpected architecture %q, which differs from the user specified architecture %q", given.Variant, expected.Variant))
0 commit comments