From 2a26299cb5c7dd2bad07186c3134bcc29a06c262 Mon Sep 17 00:00:00 2001 From: Shantanu Date: Wed, 20 Mar 2024 17:37:47 -0700 Subject: [PATCH] cmd/send: print step_id only if we generated it --- cmd/send.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd/send.go b/cmd/send.go index bb49606..8396dbb 100644 --- a/cmd/send.go +++ b/cmd/send.go @@ -40,8 +40,11 @@ var sendCmd = &cobra.Command{ return } + var quite bool if stepID == "" { stepID = idgen.New(idgen.CommandPrefix) + } else { + quite = true } data := server.RecordedData{ @@ -55,8 +58,10 @@ var sendCmd = &cobra.Command{ display.ErrorWithSupportCTA(err) return } - // print the stepID to stdout - fmt.Print(stepID) + + if !quite { + fmt.Print(stepID) + } }, }