Skip to content

JSON formatter for CLI tools preserves ASCII escape sequences #8557

Description

@lukebakken

Describe the bug

ASCII escape codes can be seen in JSON formatter output when CLI tools are used.

Reproduction steps

  • Start cluster
  • Put node into maintenance mode
  • Look at the cluster status using the JSON formatter:
    lbakken@shostakovich ~/development/rabbitmq/rabbitmq-server (main $%=)
    $ ./sbin/rabbitmqctl -n rabbit-1 --formatter=json cluster_status|jq .maintenance_status
    {
      "rabbit-1@shostakovich": "넀[35mmarked for maintenance넀[0m",
      "rabbit-2@shostakovich": "not under maintenance",
      "rabbit-3@shostakovich": "not under maintenance"
    }
    

Expected behavior

No ASCII escape codes in the JSON output

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions