Skip to content

Commit

Permalink
libimage: format platform warning
Browse files Browse the repository at this point in the history
Before:
`WARNING: image platform (linux/amd64) does not match the expected platform ({arm64 linux  [] })`

After:
`WARNING: image platform (linux/amd64) does not match the expected platform (linux/arm64)`

Fixes: containers/podman/issues/16392
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
  • Loading branch information
vrothberg committed Nov 3, 2022
1 parent 54845c3 commit 9ee36c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libimage/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ func (i *Image) matchesPlatform(ctx context.Context, os, arch, variant string) (
return nil, customPlatform, nil
}

return fmt.Errorf("image platform (%s) does not match the expected platform (%s)", fromImage, expected), customPlatform, nil
return fmt.Errorf("image platform (%s) does not match the expected platform (%s)", platforms.Format(fromImage), platforms.Format(expected)), customPlatform, nil
}

0 comments on commit 9ee36c4

Please sign in to comment.