@@ -149,6 +149,10 @@ class SummaryStats {
149149 return this . repos . length ;
150150 }
151151
152+ get abortedRepos ( ) {
153+ return this . repos . filter ( r => r . error ) . length ;
154+ }
155+
152156 get reposWithDiffErrors ( ) {
153157 return this . repos . filter ( r => r . sushiStats1 . errors != r . sushiStats2 . errors ) . length ;
154158 }
@@ -285,6 +289,8 @@ export async function run(config: Config, data: RegressionData) {
285289 chalk . redBright ( `Regression aborted for ${ repo . name } #${ repo . branch } : ${ e . message } ` )
286290 ) ;
287291 repo . error = true ;
292+ repo . sushiStats1 = new RunStats ( 1 ) ;
293+ repo . sushiStats2 = new RunStats ( 1 ) ;
288294 continue ;
289295 }
290296 if ( packageCacher ) {
@@ -650,14 +656,15 @@ function prepareJsonChunk(jsonChunk: string): string {
650656}
651657
652658async function getFilesRecursive ( dir : string ) : Promise < string [ ] > {
653- const isDirectory = await ( await fs . stat ( dir ) ) . isDirectory ( ) ;
654- if ( isDirectory ) {
659+ const stat = await fs . lstat ( dir ) ;
660+ if ( stat . isDirectory ( ) ) {
655661 const children = await fs . readdir ( dir ) ;
656662 const ancestors = await Promise . all ( children . map ( f => getFilesRecursive ( path . join ( dir , f ) ) ) ) ;
657663 return ( [ ] as string [ ] ) . concat ( ...ancestors ) ;
658- } else {
664+ } else if ( stat . isFile ( ) ) {
659665 return [ dir ] ;
660666 }
667+ return [ ] ;
661668}
662669
663670async function readFile ( file : string ) : Promise < string > {
@@ -830,6 +837,10 @@ async function createReport(repos: Repo[], elapsed: number, config: Config) {
830837 <tr>
831838 <td>Total Repos</td>
832839 <td>${ stats . totalRepos } </td>
840+ </tr>
841+ <tr>
842+ <td>Aborted Repos</td>
843+ <td>${ stats . abortedRepos } </td>
833844 </tr>
834845 <tr>
835846 <td>Repos w/ Different Output</td>
0 commit comments