diff options
-rw-r--r-- | src/pkgcheck/scripts/pkgcheck_scan.py | 2 | ||||
-rw-r--r-- | tests/scripts/test_pkgcheck_scan.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/pkgcheck/scripts/pkgcheck_scan.py b/src/pkgcheck/scripts/pkgcheck_scan.py index b19afafb..9abfe2b5 100644 --- a/src/pkgcheck/scripts/pkgcheck_scan.py +++ b/src/pkgcheck/scripts/pkgcheck_scan.py @@ -401,7 +401,7 @@ def _setup_scan(parser, namespace, args): # load repo-specific args from config if they exist namespace = config_parser.parse_config_sections(namespace, namespace.target_repo.aliases) - if os.getenv("NOCOLOR"): + if os.getenv("NO_COLOR"): namespace.color = False return namespace, args diff --git a/tests/scripts/test_pkgcheck_scan.py b/tests/scripts/test_pkgcheck_scan.py index 7b1e5bdc..83ac7760 100644 --- a/tests/scripts/test_pkgcheck_scan.py +++ b/tests/scripts/test_pkgcheck_scan.py @@ -279,12 +279,12 @@ class TestPkgcheckScanParseArgs: ) args = ("scan", "--config", str(config_file)) - with os_environ("NOCOLOR"): + with os_environ("NO_COLOR"): assert parser.parse_args(args).color is True - with os_environ(NOCOLOR="1"): - # NOCOLOR overrides config file + with os_environ(NO_COLOR="1"): + # NO_COLOR overrides config file assert parser.parse_args(args).color is False - # cmd line option overrides NOCOLOR + # cmd line option overrides NO_COLOR assert parser.parse_args([*args, "--color", "n"]).color is False assert parser.parse_args([*args, "--color", "y"]).color is True |