Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Console] Add support for NO_COLOR env var #34252
Good point @johnstevenson - reading more in depth now I also see that this really only applies to color, and not things like backspace characters and other ANSI codes, I am not sure if the intent of the isDecorated is really just about color or about more than that?
I see in a few places like ProgressBar, non-decorated output won't use overwrite. In Composer we also assume non-decorated means no support for ANSI characters at all in some places.
So I am not so sure if it's the best way here, ideally we'd need a new API for color support independently from ANSI support. I don't know if it's best to lose all ANSI when you set NO_COLOR, or if you rather get colors anyway..
This PR was merged into the 4.4 branch. Discussion ---------- [Console] Add support for NO_COLOR env var | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | License | MIT | Doc PR | Adds support for https://no-color.org/ - ideally this would be considered a bugfix and added to older releases IMO, but submitting as new feature for now. cc @johnstevenson Commits ------- c1b0a8e Add support for NO_COLOR env var