File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -392,6 +392,14 @@ fn run(cli: Cli) -> ExitCode {
392392 . wrap_err ( "failed to open file" )
393393 . and_then ( |reader| {
394394 serde_json:: from_reader :: < _ , ExecutionReport > ( reader)
395+ . map ( Some )
396+ . or_else ( |e| {
397+ if e. is_eof ( ) && matches ! ( ( e. line( ) , e. column( ) ) , ( 1 , 0 ) ) {
398+ Ok ( None )
399+ } else {
400+ Err ( e)
401+ }
402+ } )
395403 . into_diagnostic ( )
396404 . wrap_err ( "failed to parse JSON" )
397405 } )
@@ -410,11 +418,19 @@ fn run(cli: Cli) -> ExitCode {
410418 } ) ;
411419
412420 for res in exec_reports_receiver {
413- let ( _path , exec_report) = match res {
421+ let ( path , exec_report) = match res {
414422 Ok ( ok) => ok,
415423 Err ( AlreadyReportedToCommandline ) => return ExitCode :: FAILURE ,
416424 } ;
417425
426+ let exec_report = match exec_report {
427+ Some ( some) => some,
428+ None => {
429+ log:: warn!( "empty report found: {}" , path. display( ) ) ;
430+ continue ;
431+ }
432+ } ;
433+
418434 let ExecutionReport {
419435 run_info :
420436 RunInfo {
You can’t perform that action at this time.
0 commit comments