-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Console launcher should support NO_COLOR
environment variable
#3328
Comments
Team decision: Check if picocli supports this already and, if not, raise an issue. |
Seems to be the case: https://picocli.info/#_heuristics_for_enabling_ansi |
Team decision: Check if our Console Launcher already supports this or what would need to be done in order to do so. |
The console launcher already does support |
Cool! 👏 In light of that, I'm removing this from the 5.11 RC1 milestone. |
Based on my testing using 5.11, the Shell > export NO_COLOR=1
> export | grep NO_COLOR
declare -x NO_COLOR="1"
> java -cp "junit-platform-console-standalone-1.11.0.jar:tests/target/test-classes:tests/lib/*" org.junit.platform.console.ConsoleLauncher execute --scan-classpath -n "JUnit5" Output Code Looking at the code, only the Lines 32 to 37 in 40bc1c4
|
Thanks for reporting this, @dhoard - it's an initialization issue. Line 26 in abf5ac3
private boolean disableAnsiColors = System.getenv("NO_COLOR") != null; instead of being set to false . It would be even better to tap into PicoCLI's heuristic programmatically.
|
NO_COLOR
environment variable
This comment was marked as outdated.
This comment was marked as outdated.
Closing as completed on |
Support
NO_COLOR
environment variable as described by https://no-color.org in JUnit's console launcher.The text was updated successfully, but these errors were encountered: