You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. spec says any extra fields in json file can be ignored, so I think
we can't clearly distingish which type the text file is, we'd better remove
autodetect for text files.
2. without audotdetect, we must requrie to user to set file type for validation
Signed-off-by: Ma Shimiao <[email protected]>
fmt.Printf("WARNING: type %q does not support ref, which are only appropriate if type is image or imageLayout.\n", typ)
121
+
fmt.Println("WARNING: refs are only appropriate if type is image")
119
122
}
120
-
121
123
f, err:=os.Open(name)
122
124
iferr!=nil {
123
125
returnerrors.Wrap(err, "unable to open file")
@@ -144,13 +146,13 @@ var validateCommand = cli.Command{
144
146
cli.StringFlag{
145
147
Name: "type",
146
148
Usage: fmt.Sprintf(
147
-
`Type of the file to validate. If unset, oci-image-tool will try to auto-detect the type. One of "%s".`,
149
+
`Type of the file to validate. One of "%s".`,
148
150
strings.Join(validateTypes, ","),
149
151
),
150
152
},
151
153
cli.StringSliceFlag{
152
154
Name: "ref",
153
-
Usage: "A set of ref specify the search criteria for the validated reference. Format is A=B. Only support 'name', 'platform.os' and 'digest' three cases. Only applicable if type is image or imageLayout.",
155
+
Usage: "A set of ref specify the search criteria for the validated reference. Format is A=B. Only support 'name', 'platform.os' and 'digest' three cases. Only applicable if type is image",
Copy file name to clipboardExpand all lines: man/oci-image-tool-validate.1.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,15 +20,15 @@ oci-image-tool validate \- Validate one or more image files
20
20
Reference should point to a manifest or index.
21
21
e.g. --ref name=v1.0 --ref platform.os=latest
22
22
Only support `name`, `platform.os` and `digest` three cases.
23
-
Only applicable if type is image or imageLayout.
23
+
Only applicable if type is image.
24
24
25
25
**--type**=""
26
-
Type of the file to validate. If unset, oci-image-tool will try to auto-detect the type. One of "imageLayout,image,imageZip,manifest,imageIndex,config"
26
+
Type of the file to validate. One of "image,manifest,imageIndex,config"
0 commit comments