Skip to content

Commit

Permalink
#196 Mute output if outputValue == NONE and format == json|yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-andruszkiewicz-wttech committed Nov 24, 2023
1 parent a789c40 commit 5fef350
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/aem/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ func (c *CLI) printOutputDataIndented(writer *textio.PrefixWriter, value any, ke
}

func (c *CLI) printOutputMarshaled() {
if c.outputValue == common.OutputValueNone {
return
}
// Due to bug in JMESPath we need to clone response data using JSON serialization.
// Ref.: https://github.com/jmespath/go-jmespath/issues/32
outputResponse, err := c.outputResponse.Clone()
Expand Down

0 comments on commit 5fef350

Please sign in to comment.