diff --git a/robusta_krr/core/runner.py b/robusta_krr/core/runner.py index b55fe17d..a9a3ab72 100644 --- a/robusta_krr/core/runner.py +++ b/robusta_krr/core/runner.py @@ -121,7 +121,7 @@ def _process_result(self, result: Result) -> None: with open(file_name, "w") as target_file: # don't use rich when writing a csv or html to avoid line wrapping etc - if settings.format == "csv" or settings.format == "html" or settings.format == "json" or settings.format == "yaml": + if not rich or settings.format in ["csv", "html", "json", "yaml"]: target_file.write(formatted) else: console = Console(file=target_file, width=settings.width)