[core] Support auto-tty and no_color-tty for --color (#10453)

Authored by: Grub4K
This commit is contained in:
Simon Sawicki 2024-07-16 21:51:56 +02:00 committed by GitHub
parent 66ce3d76d8
commit d9cbced493
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 5 deletions

View file

@ -468,7 +468,7 @@ def validate_options(opts):
default_downloader = ed.get_basename()
for policy in opts.color.values():
if policy not in ('always', 'auto', 'no_color', 'never'):
if policy not in ('always', 'auto', 'auto-tty', 'no_color', 'no_color-tty', 'never'):
raise ValueError(f'"{policy}" is not a valid color policy')
warnings, deprecation_warnings = [], []