add '--no-colors' command-line option

This commit is contained in:
Mike Fährmann
2024-04-20 21:00:26 +02:00
parent 20e2c0042b
commit bef0bd3b49
3 changed files with 13 additions and 2 deletions

View File

@@ -38,6 +38,11 @@ def main():
except ImportError:
import toml
config.load(args.configs_toml, strict=True, loads=toml.loads)
if not args.colors:
output.ANSI = False
config.set((), "colors", False)
if util.WINDOWS:
config.set(("output",), "ansi", False)
if args.filename:
filename = args.filename
if filename == "/O":