From b045df1bec30d30f736a6070daaf18ef0d6c2c0c Mon Sep 17 00:00:00 2001 From: zhouhao Date: Mon, 4 Sep 2017 09:37:48 +0800 Subject: [PATCH] image: add a warning when the platform is not applicable Signed-off-by: zhouhao --- image/image.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/image/image.go b/image/image.go index d863b0e..3b042fa 100644 --- a/image/image.go +++ b/image/image.go @@ -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 @@ -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