File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,9 @@ export function findFileBySuffix({
6161 const foundFiles = [ ]
6262 ; ( function search ( currentDir ) {
6363 for ( const entry of fs . readdirSync ( currentDir ) ) {
64- if ( entry . startsWith ( '.' ) && ! dotFolders && fs . statSync ( path . join ( currentDir , entry ) ) . isDirectory ( ) )
65- continue // skip dotfolders if disabled
66- if ( entry == 'node_modules' ) continue
64+ if ( entry == 'node_modules' // or dotfolder but disabled
65+ || ( entry . startsWith ( '.' ) && ! dotFolders && fs . statSync ( path . join ( currentDir , entry ) ) . isDirectory ( ) )
66+ ) continue // skip it
6767 const entryPath = path . join ( currentDir , entry ) , stat = fs . statSync ( entryPath )
6868 if ( stat . isDirectory ( ) && recursive ) search ( entryPath )
6969 else if ( stat . isFile ( ) && entry . endsWith ( suffix ) // file w/ `suffix`
You can’t perform that action at this time.
0 commit comments