Skip to content

Commit aeef502

Browse files
committed
do not post empty warnings
1 parent 2ecab2c commit aeef502

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tmc-langs-cli/src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1523,6 +1523,10 @@ fn print_output_with_file<T: Serialize + Debug>(
15231523
}
15241524

15251525
fn print_warnings(pretty: bool, warnings: &[anyhow::Error]) -> Result<()> {
1526+
if warnings.is_empty() {
1527+
return Ok(());
1528+
}
1529+
15261530
let warnings_output = Output::<()>::Warnings(Warnings::from_error_list(warnings));
15271531
let warnings_json = if pretty {
15281532
serde_json::to_string_pretty(&warnings_output)

0 commit comments

Comments
 (0)