Skip to content

Commit a789c40

Browse files
#196 workaround fot JMESPath bug
jmespath/go-jmespath#32
1 parent 81e7b38 commit a789c40

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/aem/cli.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,9 @@ func (c *CLI) printOutputMarshaled() {
302302
// Due to bug in JMESPath we need to clone response data using JSON serialization.
303303
// Ref.: https://github.com/jmespath/go-jmespath/issues/32
304304
outputResponse, err := c.outputResponse.Clone()
305+
if err != nil {
306+
log.Fatalf("cannot clone CLI output data: %s", err)
307+
}
305308
outputQueried, err := jmespath.Search(c.outputQuery, outputResponse)
306309
if err != nil {
307310
log.Fatalf("cannot perform query '%s' on CLI output data: %s", c.outputQuery, err)

0 commit comments

Comments
 (0)