diff options
| author | mo8it <mo8it@proton.me> | 2024-06-01 21:50:11 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-06-01 21:50:11 +0200 |
| commit | 50530fa3cff5bc765291603873728799930d764b (patch) | |
| tree | 76b8fcd347591ba837e272c2a6b1b786ea39e957 /src | |
| parent | 611f9d8722593430d82187aebee9db5cc6952da1 (diff) | |
Don't try to check a solution that doesn't exist
Diffstat (limited to 'src')
| -rw-r--r-- | src/dev/check.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dev/check.rs b/src/dev/check.rs index 6a3597c..78396a8 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)?; |
