Skip to content

Commit 94da731

Browse files
authored
Merge pull request #82 from q384566678/test-waring
Validate main.go:add warning
2 parents 66832e7 + 4237bf4 commit 94da731

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)