Skip to content

improve error message when pushing a manifest without media type #1212

@qweeah

Description

@qweeah

Current behavior and output:

$ oras manifest push --oci-layout /sample/images:foobar:mediatype
Error: media type is not recognized. 

Suggested error message:

$ oras manifest push --oci-layout /sample/images:foobar:mediatype manifest.json
Error: media type is not specified via the flag "--media-type" nor in the manifest.json 
Usage: oras manifest push [flags] <name>[:<tag>[,<tag>][...]|@<digest>] <file>
You need to specify a valid media type in the manifest JSON or via the "--media-type" flag

Metadata

Metadata

Labels

uxUser experience related

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions