Skip to content

Commit

Permalink
Fix csv/json output to file (#390)
Browse files Browse the repository at this point in the history
Fixes #380
  • Loading branch information
aantn authored Jan 5, 2025
1 parent ce724a1 commit 95550e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion robusta_krr/core/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
if settings.format == "csv" or settings.format == "html" or settings.format == "json" or settings.format == "yaml":
target_file.write(formatted)
else:
console = Console(file=target_file, width=settings.width)
Expand Down

0 comments on commit 95550e0

Please sign in to comment.