Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support NO_COLOR environment variable in run-tests.php #5964

Closed
wants to merge 2 commits into from

Conversation

@TysonAndre
Copy link
Contributor

@TysonAndre TysonAndre commented Aug 9, 2020

See https://no-color.org/

an informal standard is hereby proposed:

All command-line software which outputs text with ANSI color added should check
for the presence of a NO_COLOR environment variable that, when present
(regardless of its value), prevents the addition of ANSI color.

E.g. CI environments may not process colors properly, or some OSes or terminals may have unanticipated issues with ansi color codes

See https://no-color.org/

> an informal standard is hereby proposed:
>
> All command-line software which outputs text with ANSI color added should check
> for the presence of a `NO_COLOR` environment variable that, when present
> (regardless of its value), prevents the addition of ANSI color.
@Girgias
Copy link
Member

@Girgias Girgias commented Aug 9, 2020

Shouldn't this also add a --with-color CLI option going from?

but configure a specific program in its configuration file to specifically enable color.

@TysonAndre
Copy link
Contributor Author

@TysonAndre TysonAndre commented Aug 9, 2020

Shouldn't this also add a --with-color CLI option?

I'd assumed that was already added without checking if it was, e.g. to deliberately enable color codes in CI or for saving for less -R later.
I was mistaken, adding that.

@nikic
nikic approved these changes Aug 12, 2020
@TysonAndre
Copy link
Contributor Author

@TysonAndre TysonAndre commented Aug 12, 2020

Closed by 45d69fb

@TysonAndre TysonAndre closed this Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants