Skip to content

Commit 95550e0

Browse files
authored
Fix csv/json output to file (#390)
Fixes #380
1 parent ce724a1 commit 95550e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

robusta_krr/core/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def _process_result(self, result: Result) -> None:
121121

122122
with open(file_name, "w") as target_file:
123123
# don't use rich when writing a csv or html to avoid line wrapping etc
124-
if settings.format == "csv" or settings.format == "html":
124+
if settings.format == "csv" or settings.format == "html" or settings.format == "json" or settings.format == "yaml":
125125
target_file.write(formatted)
126126
else:
127127
console = Console(file=target_file, width=settings.width)

0 commit comments

Comments
 (0)