Skip to content

(cli): enforce colored output #1031

@metametadata

Description

@metametadata

Introduce an arg for cdk CLI app to enforce colored output. There's no such feature yet, the user either can always disable colors (--no-color) or let the app detect the TTY and use colors depending on that (default).

Use Case

I call cdk programmatically from Clojure (using built-in Java ProcessBuilder) and want to get the colored output to sometimes print it myself.

The workarounds currently are to use pty4j or wrap calls with script so that cdk thinks it prints into TTY.

Proposed Solution

It can be a new arg, e.g. --always-color.

Or something like --color=[auto, always, never] similarly to git CLI. But this may require deprecating --no-color.


This is a 🚀 Feature Request

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions