Skip to content

Commit

Permalink
Add BEHAVE_COLOR env var
Browse files Browse the repository at this point in the history
  • Loading branch information
msabramo authored and bittner committed Jul 7, 2021
1 parent a93a079 commit bfda544
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions behave/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def valid_python_module(path):

(("--color",),
dict(dest="color", choices=["never", "always", "auto"],
default=None, const="auto", nargs="?",
default=os.getenv('BEHAVE_COLOR'), const="auto", nargs="?",
help="""Use ANSI color escapes. Defaults to %(const)r.
This switch is used to override a
configuration file setting.""")),
Expand Down Expand Up @@ -507,7 +507,7 @@ class Configuration(object):
"""Configuration object for behave and behave runners."""
# pylint: disable=too-many-instance-attributes
defaults = dict(
color=sys.platform != "win32",
color='never' if sys.platform == "win32" else os.getenv('BEHAVE_COLOR', 'auto'),
show_snippets=True,
show_skipped=True,
dry_run=False,
Expand Down

0 comments on commit bfda544

Please sign in to comment.