Skip to content

improve error log for oras push and oras attach when annotation file is invalid #1021

Closed

Description

@qweeah

If a malformed JSON file is provided via --annotation-file flag, oras will output below error log, which is hard to understand for the common user.

Error: json: cannot unmarshal string into Go value of type map[string]string

CLI should

  1. give hints of the provided path of JSON file is malformed, and
  2. point user to the document in https://oras.land/docs/how_to_guides/manifest_annotations.

Activity

  1. added
    good first issue
    ux
    on Jul 12, 2023
  2. added this to the v1.2.0 milestone on Jul 12, 2023
  3. 1Shubham7 commented on Jul 12, 2023

    @1Shubham7
    Contributor

    @qweeah Please assign me this issue.

  4. modified the milestones: v1.2.0, v1.1.0 on Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

good first issueloggingux

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions