From 9487208635fe8b9f59af9997c0a0e1f277898b46 Mon Sep 17 00:00:00 2001 From: Bob Callaway Date: Fri, 12 May 2023 11:11:50 -0700 Subject: [PATCH] omit informational message if machine-parseable output has been requested Signed-off-by: Bob Callaway --- cmd/rekor-cli/app/search.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/rekor-cli/app/search.go b/cmd/rekor-cli/app/search.go index 4552a1c3f..2b1e89d17 100644 --- a/cmd/rekor-cli/app/search.go +++ b/cmd/rekor-cli/app/search.go @@ -201,7 +201,9 @@ var searchCmd = &cobra.Command{ return nil, fmt.Errorf("no matching entries found") } - fmt.Fprintln(os.Stderr, "Found matching entries (listed by UUID):") + if viper.GetString("format") != "json" { + fmt.Fprintln(os.Stderr, "Found matching entries (listed by UUID):") + } return &searchCmdOutput{ UUIDs: resp.GetPayload(),