Write the solution file on done

This commit is contained in:
mo8it
2024-04-24 00:47:46 +02:00
parent 2dac8e509b
commit b77007887c
2 changed files with 50 additions and 14 deletions
+10
View File
@@ -264,6 +264,16 @@ impl AppState {
self.n_done += 1;
}
if self.official_exercises {
EMBEDDED_FILES.write_solution_to_disk(
self.current_exercise_ind,
exercise
.dir
.context("Official exercises must be nested in the `exercises` directory")?,
exercise.name,
)?;
}
let Some(ind) = self.next_pending_exercise_ind() else {
writer.write_all(RERUNNING_ALL_EXERCISES_MSG)?;