Fix tests

This commit is contained in:
mo8it
2024-04-05 00:44:43 +02:00
parent 919ba88413
commit 5a233398eb
3 changed files with 7 additions and 18 deletions
+5 -5
View File
@@ -1,4 +1,4 @@
use anyhow::Result;
use anyhow::{bail, Result};
use std::io::{stdout, Write};
use crate::exercise::Exercise;
@@ -17,11 +17,11 @@ pub fn run(exercise: &Exercise) -> Result<()> {
stdout.flush()?;
}
if output.status.success() {
success!("Successfully ran {}", exercise);
} else {
warn!("Ran {} with errors", exercise);
if !output.status.success() {
bail!("Ran {exercise} with errors");
}
success!("Successfully ran {}", exercise);
Ok(())
}