Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

[ADD] support for Windows terminal colored output. #229

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions codecov/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
import argparse
from time import sleep
from json import loads
try:
import colorama
except ImportError: # pragma: no cover
# No color support on Windows
print('colorama not found -> No color support on Windows')

try:
from urllib.parse import urlencode
Expand Down Expand Up @@ -208,6 +213,9 @@ def _add_env_if_not_empty(lst, value):

def main(*argv, **kwargs):
root = os.getcwd()

# Initialise Colorama
colorama.init()

# Build Parser
# ------------
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
packages=['codecov'],
include_package_data=True,
zip_safe=True,
install_requires=["requests>=2.7.9", "coverage"],
install_requires=["requests>=2.7.9", "coverage", "colorama"],
entry_points={'console_scripts': ['codecov=codecov:main']},
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
)