mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-06 18:13:29 +02:00
Don't try to check a solution that doesn't exist
This commit is contained in:
@@ -166,6 +166,11 @@ fn check_solutions(info_file: &InfoFile) -> Result<()> {
|
|||||||
let mut output = Vec::with_capacity(OUTPUT_CAPACITY);
|
let mut output = Vec::with_capacity(OUTPUT_CAPACITY);
|
||||||
|
|
||||||
for exercise_info in &info_file.exercises {
|
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)?;
|
let success = exercise_info.run_solution(&mut output, &target_dir)?;
|
||||||
if !success {
|
if !success {
|
||||||
io::stderr().write_all(&output)?;
|
io::stderr().write_all(&output)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user