NO_COLOR=1 does not suppress all color escapes
See original GitHub issueCurrent behavior:
As mentioned here https://github.com/cypress-io/cypress/issues/1748#issuecomment-390682159 there is a NO_COLOR=1
flag. (It doesn’t seem documented though, I found it via Google. Maybe that’s another issue though.)
When this is set, most of the colors are suppressed, but I still see some things in the CI logs that seem like color escape codes.
2019-10-29T10:49:45.5683027Z [2K[0G [32m ✓[0m[90m should allow brand creation[0m[31m (11492ms)[0m
2019-10-29T10:49:51.2829146Z [2K[0G [32m ✓[0m[90m should not allow creating the same brand[0m[31m (5803ms)[0m
2019-10-29T10:49:51.3044692Z
2019-10-29T10:49:51.3056465Z
2019-10-29T10:49:51.3057924Z [92m [0m[32m 2 passing[0m[90m (17s)[0m`

Desired behavior:
There should be no escape codes in the output, just ascii chars.
Steps to reproduce: (app code and test code)
- Set up a CI build on Azure Devops.
- Run Cypress with
NO_COLOR=1
env var via Docker with the following command:
docker run --rm -t -e NO_COLOR=1 -v /work/agent-0/r1/a/src/cypress-files:/src cypress/included:3.4.1 -P /src
Versions
Cypress 3.4.1 running via Docker:
docker run --rm -t -e NO_COLOR=1 -v /work/agent-0/r1/a/src/cypress-files:/src cypress/included:3.4.1 -P /src
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:6 (2 by maintainers)
Top Results From Across the Web
NO_COLOR: disabling ANSI color output in various Unix ...
Software Description Date/Version Supported
alogview Android logcat Filter 2018‑10‑31
Ammonite Scala Scripting 2017‑07‑03 / 1.0.0
Ansible IT automation system 2021‑04‑26 / 2.11.0
Read more >How can I check what level of color support a terminal has in ...
What I mean by this is create a function supportsColor() that checks how many colors can be displayed in sys.stdout , returning 0...
Read more >macos - Is it possible to disable Terminal's automatic tweaking ...
Here's the trick that you need to know: Values set via RGB get mangled, those set via HSB do not. I had a...
Read more >bash column command confused by ANSI color escapes
I've narrowed it down to the ANSI Color escape codes. If I remove those, the columns come out lined up. The zsh version...
Read more >arXiv:2003.05291v1 [math.CO] 11 Mar 2020
Andrews's k-compositions [4] where every part but the last has k possible colors,. [12] where odd parts have two possible colors, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not sure if this will help anyone but I’m running a Cypress docker image in a jenkinsfile and I found that I had to pass the
NO_COLOR=1
env var to thedocker run
part rather than as an env flag passed tocypress run
. Previously I was runningcypress run --env NO_COLOR=1
and it was making no difference.Another Information to this topic:
We have problems with our Cypress runs stdout in Jenkins. So we added “NO_COLOR=1”, but the problem didn’t disappear. I just retestet it locally on my machine and found colors in the summary.
tl;dr All outputs are free of color except the summary. See screenshot
Is this a known issue? Shall I open a new issue?