From 311fe86de2b3d64c9a156566ed2c59b6379fc693 Mon Sep 17 00:00:00 2001 From: d-d-up Date: Sat, 8 Oct 2022 10:58:10 +0800 Subject: [PATCH] fix the problem of json output Signed-off-by: d-d-up --- pkg/registry/client.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/registry/client.go b/pkg/registry/client.go index c1004f956..ac976d3a9 100644 --- a/pkg/registry/client.go +++ b/pkg/registry/client.go @@ -23,6 +23,7 @@ import ( "io" "io/ioutil" "net/http" + "os" "sort" "strings" @@ -416,8 +417,8 @@ func (c *Client) Pull(ref string, options ...PullOption) (*PullResult, error) { } } - fmt.Fprintf(c.out, "Pulled: %s\n", result.Ref) - fmt.Fprintf(c.out, "Digest: %s\n", result.Manifest.Digest) + fmt.Fprintf(os.Stderr, "Pulled: %s\n", result.Ref) + fmt.Fprintf(os.Stderr, "Digest: %s\n", result.Manifest.Digest) if strings.Contains(result.Ref, "_") { fmt.Fprintf(c.out, "%s contains an underscore.\n", result.Ref)