Skip to content

Commit

Permalink
fix output in attaching
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <[email protected]>
  • Loading branch information
qweeah committed Nov 15, 2023
1 parent 5874bab commit 658ce89
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/oras/root/attach.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"oras.land/oras-go/v2/content"
"oras.land/oras-go/v2/content/file"
"oras.land/oras-go/v2/registry/remote/auth"
"oras.land/oras/cmd/oras/internal/display"
"oras.land/oras/cmd/oras/internal/display/track"
"oras.land/oras/cmd/oras/internal/meta"
"oras.land/oras/cmd/oras/internal/option"
Expand Down Expand Up @@ -180,8 +181,8 @@ func runAttach(ctx context.Context, opts attachOptions) error {
if !strings.HasSuffix(opts.RawReference, digest) {
opts.RawReference = fmt.Sprintf("%s@%s", opts.Path, subject.Digest)
}
fmt.Println("Attached to", opts.AnnotatedReference())
fmt.Println("Digest:", root.Digest)
display.PrintErr("Attached to", opts.AnnotatedReference())
display.PrintErr("Digest:", root.Digest)

// Export manifest
if err = opts.ExportManifest(ctx, store, root); err != nil {
Expand Down

0 comments on commit 658ce89

Please sign in to comment.