Add the most important message

This commit is contained in:
datdenkikniet 2023-04-15 20:19:37 +02:00
parent eac593e300
commit fa8af4cbcf
2 changed files with 5 additions and 3 deletions

View file

@ -771,7 +771,7 @@ pub fn run_successful(run: &RunResult, expected_output_file: &str) -> Result<(),
} }
} }
pub fn handle_results(globals: &Globals, results: Vec<FinalRunResult>) -> anyhow::Result<()> { pub fn handle_results(globals: &Globals, results: Vec<FinalRunResult>) -> Result<(), ()> {
let errors = results.iter().filter_map(|r| { let errors = results.iter().filter_map(|r| {
if let FinalRunResult::Failed(c, r) = r { if let FinalRunResult::Failed(c, r) = r {
Some((c, r)) Some((c, r))
@ -842,8 +842,10 @@ pub fn handle_results(globals: &Globals, results: Vec<FinalRunResult>) -> anyhow
let ecount = errors.count(); let ecount = errors.count();
if ecount != 0 { if ecount != 0 {
Err(anyhow::anyhow!("{ecount} commands failed.")) log::error!("{ecount} commands failed.");
Err(())
} else { } else {
info!("🚀🚀🚀 All tasks succeeded 🚀🚀🚀");
Ok(()) Ok(())
} }
} }

View file

@ -298,7 +298,7 @@ fn main() -> anyhow::Result<()> {
} }
}; };
handle_results(globals, final_run_results) handle_results(globals, final_run_results).map_err(|_| anyhow::anyhow!("Commands failed"))
} }
// run example binary `example` // run example binary `example`