Closed aaltemara closed 5 months ago
I can't reproduce this right away, I think we have some logic that disables colorize:
def setup(level: int = logging.INFO, log_colors: bool = True) -> None:
colorama.init()
color_out = log_colors and bool(sys.stdout) and sys.stdout.isatty()
color_err = log_colors and bool(sys.stderr) and sys.stderr.isatty()
...
from dvc/logger.py
Moreover, -q
doesn't produce (expected any results for me).
Is there anything specific about your setup? What terminal are you using?
Bug Report
Issue name
dvc status --json: not parsable due to color escape codes
Description
Expectation is that --json produces json-compatible output. This is not the case, due to ANSI escape codes that lead to invalid json.
Reproduce
Expected
(No escape codes) {}
I expect to be able to pipe the output of a --json command into 'jq' without json formatting errors
Environment information
Output of
dvc doctor
:Additional Information (if any):