Skip to content

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

@qweeah

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions