mirror of
https://github.com/onyx-and-iris/slobs-cli.git
synced 2025-06-27 15:20:24 +01:00
leave it up to rich... if no style is set we still get colour on stderr, but this can be overriden with NO_COLOR manually
patch bump
This commit is contained in:
parent
d8622ab037
commit
fe3a975ba3
@ -1,3 +1,3 @@
|
|||||||
"""module for package metadata."""
|
"""module for package metadata."""
|
||||||
|
|
||||||
__version__ = '0.11.1'
|
__version__ = '0.11.2'
|
||||||
|
@ -1,14 +1,10 @@
|
|||||||
"""module for console output handling."""
|
"""module for console output handling."""
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
import asyncclick as click
|
import asyncclick as click
|
||||||
from rich.console import Console
|
from rich.console import Console
|
||||||
|
|
||||||
out = Console()
|
out = Console()
|
||||||
err = Console(
|
err = Console(stderr=True, style='bold red')
|
||||||
stderr=True, style='bold red' if os.getenv('NO_COLOR', '') != '' else 'none'
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def highlight(ctx: click.Context, text: str) -> str:
|
def highlight(ctx: click.Context, text: str) -> str:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user