chore(ci): allow synced repos to not have sections

This commit is contained in:
rektdeckard
2024-12-28 23:47:06 -07:00
committed by Tobias Fried
parent 1f1b3450c1
commit 31595b49cf

View File

@@ -15,7 +15,7 @@ const SYNC_SECTIONS = ["LINKS"];
for (const section of SYNC_SECTIONS) {
const sectionContent = extractSection(readmeContent, section);
if (!sectionContent) throw new Error(`Section ${section} not found in README.md`);
if (!sectionContent) continue;
const targetReadmeContent = fs.readFileSync(targetReadmePath, "utf8");
const updatedDocsContent = updateSection(targetReadmeContent, section, sectionContent);