Skip to content
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

feat: support FORCE_COLOR #524

Merged
merged 2 commits into from Dec 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/usage.rst
Expand Up @@ -329,7 +329,8 @@ Controlling color output
By default, Nox will output colorful logs if you're using in an interactive
terminal. However, if you are redirecting ``stderr`` to a file or otherwise
not using an interactive terminal, or the environment variable ``NO_COLOR`` is
set, nox will output in plaintext.
set, nox will output in plaintext. If this is not set, and ``FORCE_COLOR`` is
present, color will be forced.

You can manually control Nox's output using the ``--nocolor`` and ``--forcecolor`` flags.

Expand Down
2 changes: 1 addition & 1 deletion nox/_options.py
Expand Up @@ -463,7 +463,7 @@ def _session_completer(
"--forcecolor",
"--force-color",
group=options.groups["reporting"],
default=False,
default=lambda: "FORCE_COLOR" in os.environ,
action="store_true",
help="Force color output, even if stdout is not an interactive terminal.",
),
Expand Down