Mention --ansi never in --no-ansi deprecation

Ideally deprecation messages should point users directly at the non-deprecated alternative so it's a no-brainer for someone to switch to it.

Signed-off-by: Tim Kevin Oxley <secoif@gmail.com>
This commit is contained in:
Tim Kevin Oxley 2021-03-29 09:54:28 -04:00 committed by Ulysses Souza
parent 1607674374
commit 84c816e887

View File

@ -171,7 +171,8 @@ def dispatch():
if options.get("--no-ansi"):
if options.get("--ansi"):
raise UserError("--no-ansi and --ansi cannot be combined.")
log.warning('--no-ansi option is deprecated and will be removed in future versions.')
log.warning('--no-ansi option is deprecated and will be removed in future versions. '
'Use `--ansi never` instead.')
ansi_mode = AnsiMode.NEVER
setup_console_handler(console_handler,