codecov-python
codecov-python copied to clipboard
Colorer characters printed out on windows
Here is the output of codecov, where there are some unwanted characters like [90m==>[0m
D:\foo>codecov
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _ |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \____|\___|\___\___/ \_/
v2.0.15
[90m==>[0m Detecting CI provider
-> Got branch from git/hg
-> Got sha from git/hg
[90m==>[0m Preparing upload
The filename, directory name, or volume label syntax is incorrect.
Error running `cd 'D:\foo' && git ls-files`: None
[41mError:[0m[91m Missing repository upload token[0m
[42mTip:[0m[32m See all example repositories: https://github.com/codecov?query=example[0m
[92mSupport channels:[0m
Email: [email protected]
IRC: #codecov
Gitter: https://gitter.im/codecov/support
Twitter: @codecov
I use:
- Win 10.0.18363 Build 18363 (both cmd and powershell)
- Python 3.7.4
- Codecov py-v2.0.15 - https://codecov.io/
A workaround is to use --no-color
switch. However this should be solved, codecov should detect the platform.
I suggest to use colorama or termcolor or any other handy tool for colored output, instead of the current, platform specific way.
Colors work properly in PowerShell command prompt, however it does not work in cmd prompt.