@@ -733,7 +733,7 @@ fn run_core(
733733 . collect :: < Result < Vec < _ > > > ( ) ?;
734734
735735 let projects_dir = tmc_langs:: get_projects_dir ( client_name) ?;
736- match tmc_langs:: download_or_update_course_exercises (
736+ let data = match tmc_langs:: download_or_update_course_exercises (
737737 & client,
738738 & projects_dir,
739739 & exercise_ids,
@@ -742,29 +742,26 @@ fn run_core(
742742 DownloadResult :: Success {
743743 downloaded,
744744 skipped,
745- } => {
746- let data = DownloadOrUpdateCourseExercisesResult {
747- downloaded,
748- skipped,
749- } ;
750- let output = Output :: finished_with_data (
751- "downloaded or updated exercises" ,
752- Data :: ExerciseDownload ( data) ,
753- ) ;
754- print_output ( & output, pretty) ?
755- }
745+ } => DownloadOrUpdateCourseExercisesResult {
746+ downloaded,
747+ skipped,
748+ failed : None ,
749+ } ,
756750 DownloadResult :: Failure {
757751 downloaded,
758752 skipped,
759753 failed,
760- } => {
761- anyhow:: bail!( DownloadsFailedError {
762- downloaded,
763- skipped,
764- failed,
765- } )
766- }
767- }
754+ } => DownloadOrUpdateCourseExercisesResult {
755+ downloaded,
756+ skipped,
757+ failed : Some ( failed) ,
758+ } ,
759+ } ;
760+ let output = Output :: finished_with_data (
761+ "downloaded or updated exercises" ,
762+ Data :: ExerciseDownload ( data) ,
763+ ) ;
764+ print_output ( & output, pretty) ?
768765 }
769766 ( "get-course-data" , Some ( matches) ) => {
770767 let course_id = matches. value_of ( "course-id" ) . unwrap ( ) ;
0 commit comments