Skip to content

Commit 4237bf4

Browse files
author
zhouhao
committed
Validate main.go:add warning
Signed-off-by: zhouhao <[email protected]>
1 parent 27d5fd6 commit 4237bf4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/oci-image-validate/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ func (v *validateCmd) validatePath(name string) error {
158158
return image.Validate(name, v.refs, v.stdout)
159159
}
160160

161+
if len(v.refs) != 0 {
162+
fmt.Printf("WARNING: type %q does not support refs, which are only appropriate if type is image or imageLayout.\n", typ)
163+
}
164+
161165
f, err := os.Open(name)
162166
if err != nil {
163167
return errors.Wrap(err, "unable to open file")

0 commit comments

Comments
 (0)