Skip to content

Commit

Permalink
#196 workaround fot JMESPath bug
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-andruszkiewicz-wttech committed Nov 20, 2023
1 parent 81e7b38 commit a789c40
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 @@ -302,6 +302,9 @@ func (c *CLI) printOutputMarshaled() {
// 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()
if err != nil {
log.Fatalf("cannot clone CLI output data: %s", err)
}
outputQueried, err := jmespath.Search(c.outputQuery, outputResponse)
if err != nil {
log.Fatalf("cannot perform query '%s' on CLI output data: %s", c.outputQuery, err)
Expand Down

0 comments on commit a789c40

Please sign in to comment.