Description:
.NET previously disabled console colors if it detected that the output was redirected. Recently, a new environment variable has been added to override this: dotnet/runtime#47935
Setting below environment variables will enable colorful output when running on GitHub Actions (not on Windows though):
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION to 1 or true
TERM to xterm
More info: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables#dotnet_system_console_allow_ansi_color_redirection
Relevant discussion explaining the need for the second variable: dotnet/runtime#68302 (comment)
Justification:
Colorful output is much easier to visually parse and, since we can guarantee that we're always running on GitHub Actions (which supports ansi color escape codes), it makes sense to make this setting enabled by default. As the worst case, this should be at least added as one of the action inputs, but I think enabling it by default is the way to go (not anymore, read comments below).
Are you willing to submit a PR?
Sure
Description:
.NET previously disabled console colors if it detected that the output was redirected. Recently, a new environment variable has been added to override this: dotnet/runtime#47935
Setting below environment variables will enable colorful output when running on GitHub Actions (not on Windows though):
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTIONto1ortrueTERMtoxtermMore info: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables#dotnet_system_console_allow_ansi_color_redirection
Relevant discussion explaining the need for the second variable: dotnet/runtime#68302 (comment)
Justification:
Colorful output is much easier to visually parse and, since we can guarantee that we're always running on GitHub Actions (which supports ansi color escape codes), it makes sense to make this setting enabled by default. As the worst case, this should be at least added as one of the action inputs,
but I think enabling it by default is the way to go(not anymore, read comments below).Are you willing to submit a PR?
Sure