Skip to content
Snippets Groups Projects
Commit f6d3f961 authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

main.py: Renamed option to --colors / --no-colors

parent 956a003c
Branches
Tags
No related merge requests found
...@@ -77,8 +77,8 @@ _, _, _, _, host_machine = os.uname() ...@@ -77,8 +77,8 @@ _, _, _, _, host_machine = os.uname()
@click.option('--log-file', @click.option('--log-file',
type=click.File(mode='w', encoding='UTF-8'), type=click.File(mode='w', encoding='UTF-8'),
help="A file to store the main log (allows storing the main log while in interactive mode)") help="A file to store the main log (allows storing the main log while in interactive mode)")
@click.option('--ansi-colors/--no-ansi-colors', default=None, @click.option('--colors/--no-colors', default=None,
help="Force enable/disable ANSI color and control codes in output") help="Force enable/disable ANSI color codes in output")
@click.pass_context @click.pass_context
def cli(context, **kwargs): def cli(context, **kwargs):
"""Build and manipulate BuildStream projects """Build and manipulate BuildStream projects
...@@ -465,9 +465,9 @@ class App(): ...@@ -465,9 +465,9 @@ class App():
self.messaging_enabled = True self.messaging_enabled = True
# Resolve whether to use colors in output # Resolve whether to use colors in output
if self.main_options['ansi_colors'] is None: if self.main_options['colors'] is None:
self.colors = self.is_a_tty self.colors = self.is_a_tty
elif self.main_options['ansi_colors']: elif self.main_options['colors']:
self.colors = True self.colors = True
else: else:
self.colors = False self.colors = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment