Skip to content

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

Closed

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

Activity

  1. added
    ux
    on Dec 26, 2023
  2. added this to the v1.2.0 milestone on Dec 26, 2023
  3. wangxiaoxuan273 commented on Jan 11, 2024

    @wangxiaoxuan273
    Contributor

    I would like to work on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

ux

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions