fix: prevent EISDIR crash when customIgnoreFilePaths contains directories (#19868) (#19898)

Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
This commit is contained in:
Suhaan Raqeeb Khavas
2026-05-12 02:16:08 +05:30
committed by GitHub
parent c0d5ab1f1e
commit 8e58df72c6
4 changed files with 53 additions and 3 deletions
+4 -1
View File
@@ -105,7 +105,10 @@ export class IgnoreFileParser implements IgnoreFileFilter {
.slice()
.reverse()
.map((fileName) => path.join(this.projectRoot, fileName))
.filter((filePath) => fs.existsSync(filePath));
.filter(
(filePath) =>
fs.statSync(filePath, { throwIfNoEntry: false })?.isFile() ?? false,
);
}
/**