From 1ebea1266228b4d2a9def80384ae6eb693adbf6a Mon Sep 17 00:00:00 2001 From: "R.I.Pienaar" Date: Tue, 18 Feb 2020 11:28:17 +0100 Subject: [PATCH] produce valid json output in str copy and edit --- jsm/str_command.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jsm/str_command.go b/jsm/str_command.go index 67d6c0f..b49942c 100644 --- a/jsm/str_command.go +++ b/jsm/str_command.go @@ -365,7 +365,9 @@ func (c *streamCmd) editAction(pc *kingpin.ParseContext) error { err = sourceStream.UpdateConfiguration(cfg) kingpin.FatalIfError(err, "could not edit Stream %s", c.stream) - fmt.Printf("Stream %s was updated\n\n", c.stream) + if !c.json { + fmt.Printf("Stream %s was updated\n\n", c.stream) + } return c.infoAction(pc) } @@ -388,7 +390,9 @@ func (c *streamCmd) cpAction(pc *kingpin.ParseContext) error { _, err = jsch.NewStreamFromDefault(cfg.Name, cfg) kingpin.FatalIfError(err, "could not create Stream") - fmt.Printf("Stream %s was created\n\n", c.stream) + if !c.json { + fmt.Printf("Stream %s was created\n\n", c.stream) + } c.stream = c.destination return c.infoAction(pc)