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,10 +61,10 @@ export function findFileBySuffix({
6161 const foundFiles = [ ]
6262 ; ( function search ( currentDir ) {
6363 for ( const entry of fs . readdirSync ( currentDir ) ) {
64- if ( entry == 'node_modules' // or dotfolder but disabled
65- || ( entry . startsWith ( '.' ) && ! dotFolders && fs . statSync ( path . join ( currentDir , entry ) ) . isDirectory ( ) )
66- ) continue // skip it
6764 const entryPath = path . join ( currentDir , entry ) , stat = fs . statSync ( entryPath )
65+ if ( entry == 'node_modules'
66+ || ( entry . startsWith ( '.' ) && ! dotFolders && stat . isDirectory ( ) ) // dotfolder but disabled
67+ ) continue // skip it
6868 if ( stat . isDirectory ( ) && recursive ) search ( entryPath )
6969 else if ( stat . isFile ( ) && entry . endsWith ( suffix ) // file w/ `suffix`
7070 && ( dotFiles || ! entry . startsWith ( '.' ) ) // not dotfile if disabled
You can’t perform that action at this time.
0 commit comments