Skip to content

Commit

Permalink
fix: --force-color command line argument overrides NO_COLOR envir…
Browse files Browse the repository at this point in the history
…onment variable (#723)

Change function to support behavior from issue
"--force-color should override NO_COLOR in the containing environment"
  • Loading branch information
stasfilin authored Jul 12, 2023
1 parent e0bd1e5 commit 06f5034
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nox/_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def _color_finalizer(value: bool, args: argparse.Namespace) -> bool:
if args.forcecolor:
return True

if args.nocolor:
if args.nocolor or "NO_COLOR" in os.environ:
return False

return sys.stdout.isatty()
Expand Down

0 comments on commit 06f5034

Please sign in to comment.