From 50530fa3cff5bc765291603873728799930d764b Mon Sep 17 00:00:00 2001 From: mo8it Date: Sat, 1 Jun 2024 21:50:11 +0200 Subject: [PATCH] Don't try to check a solution that doesn't exist --- src/dev/check.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dev/check.rs b/src/dev/check.rs index 6a3597cc..78396a8b 100644 --- a/src/dev/check.rs +++ b/src/dev/check.rs @@ -166,6 +166,11 @@ fn check_solutions(info_file: &InfoFile) -> Result<()> { let mut output = Vec::with_capacity(OUTPUT_CAPACITY); for exercise_info in &info_file.exercises { + if !Path::new(&exercise_info.sol_path()).exists() { + // No solution to check. + continue; + } + let success = exercise_info.run_solution(&mut output, &target_dir)?; if !success { io::stderr().write_all(&output)?;