ktr0731 / evans

Evans: more expressive universal gRPC client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unknown flag '--json' when used together with '--enrich' option

shizzard opened this issue · comments

Evans reports the unknown flag --json.
Documentation states:

Enriched response
To display more enriched response, you can use --enrich option.
...
JSON output is also available with --json option.

I need the whole output to be a valid JSON to be able to handle it with jq.

To reproduce

Basically any gRPC call with --enrich --json flags will work:

$ evans \
    --path <path-to-proto-library> \
    --proto <path-to-proto-file> \
    --host <host> \
    --port <port> \
    --file <request-file> \
    cli call  --enrich --json \
    <service>.<method>
    
	evans: unknown flag: --json

--enrich option alone works as expected.

Expected behavior

Whole evans output is a valid JSON object.

Environment

  • OS: MacOS Ventura
  • Terminal: warp/zsh
  • Evans version: 0.10.11
  • protoc version: 3.21.12

UPDATE: after digging into the code i found that the proper flag is --output json.
I suppose you can just fix the documentation.

commented

Thank you! Fixed in #653.