Skip to content

Commit

Permalink
image: add a warning when the platform is not applicable
Browse files Browse the repository at this point in the history
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
  • Loading branch information
zhouhao committed Sep 4, 2017
1 parent f3b94b3 commit b045df1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions image/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ func unpack(w walker, dest, refName, platform string) error {
}

if ref.MediaType == validRefMediaTypes[0] {
if platform != "" {
fmt.Println("WARNING: reftype manifest does not support platform option, which are only applicable if reftype is index.")
}

m, err := findManifest(w, ref)
if err != nil {
return err
Expand Down Expand Up @@ -255,6 +259,10 @@ func createRuntimeBundle(w walker, dest, refName, rootfs, platform string) error
}

if ref.MediaType == validRefMediaTypes[0] {
if platform != "" {
fmt.Println("WARNING: reftype manifest does not support platform option, which are only applicable if reftype is index.")
}

m, err := findManifest(w, ref)
if err != nil {
return err
Expand Down

0 comments on commit b045df1

Please sign in to comment.