Skip to content

Commit

Permalink
fix: add digest to fetched status output of manifest index create (#…
Browse files Browse the repository at this point in the history
…1579)

Signed-off-by: Xiaoxuan Wang <[email protected]>
Co-authored-by: Xiaoxuan Wang <[email protected]>
Co-authored-by: Terry Howe <[email protected]>
  • Loading branch information
3 people authored Dec 26, 2024
1 parent b72d1f5 commit 836c497
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/oras/internal/display/status/text.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,11 @@ func (mich *TextManifestIndexCreateHandler) OnFetching(source string) error {
}

// OnFetched implements ManifestIndexCreateHandler.
func (mich *TextManifestIndexCreateHandler) OnFetched(source string, _ ocispec.Descriptor) error {
return mich.printer.Println(IndexPromptFetched, source)
func (mich *TextManifestIndexCreateHandler) OnFetched(ref string, desc ocispec.Descriptor) error {
if contentutil.IsDigest(ref) {
return mich.printer.Println(IndexPromptFetched, ref)
}
return mich.printer.Println(IndexPromptFetched, desc.Digest, ref)
}

// OnIndexPacked implements ManifestIndexCreateHandler.
Expand Down

0 comments on commit 836c497

Please sign in to comment.