Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #98 from nats-io/valid_json
Browse files Browse the repository at this point in the history
produce valid json output in str copy and edit
  • Loading branch information
ripienaar authored Feb 18, 2020
2 parents 2b441b8 + 1ebea12 commit f70822b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions jsm/str_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
Expand Down

0 comments on commit f70822b

Please sign in to comment.