Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improving error log for oras push and oras attach when the annotation file is invalid #1026

Merged
merged 13 commits into from
Jul 27, 2023
Prev Previous commit
Next Next commit
adding the changes as per billy's review
Signed-off-by: Shubham Singh <shubhammahar1306@gmail.com>
  • Loading branch information
1Shubham7 committed Jul 22, 2023
commit 2a28f92b039a3eb51882212583e46311c0af74d5
3 changes: 2 additions & 1 deletion cmd/oras/internal/option/packer.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ func (opts *Packer) LoadManifestAnnotations() (annotations map[string]map[string
if opts.AnnotationFilePath != "" {
if err = decodeJSON(opts.AnnotationFilePath, &annotations); err != nil {
return nil, fmt.Errorf("error loading manifest annotations from file %s: %w,
Refer to the document at https://oras.land/docs/how_to_guides/manifest_annotations ", opts.AnnotationFilePath, err)
refer to the document at https://oras.land/docs/how_to_guides/manifest_annotations", opts.AnnotationFilePath, err)
}

}
if len(opts.ManifestAnnotations) != 0 {
annotations = make(map[string]map[string]string)
Expand Down