Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Erik van der Boom 2026-07-22 00:13:31 +02:00 committed by GitHub
parent 170fd31fc5
commit 337fa87592
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1729,7 +1729,13 @@ function listStoryMarkdownFiles(root: string): string[] {
}
function collectMarkdownFiles(dir: string, acc: string[]): void {
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
let entries: fs.Dirent[];
try {
entries = fs.readdirSync(dir, { withFileTypes: true });
} catch {
return;
}
for (const entry of entries) {
const fullPath = path.join(dir, entry.name);
if (entry.isDirectory()) {
collectMarkdownFiles(fullPath, acc);