Print at which file docs parsing failed (#5040)

This commit is contained in:
qwerty287
2025-04-01 16:13:01 +03:00
committed by GitHub
parent a3c8cc9283
commit 219f05c1d3

View File

@@ -23,7 +23,14 @@ async function loadContent(): Promise<Content> {
return undefined; return undefined;
} }
const docsHeader = markdown.getHeader<WoodpeckerPluginHeader>(docsContent); let docsHeader: WoodpeckerPluginHeader;
try {
docsHeader = markdown.getHeader<WoodpeckerPluginHeader>(docsContent);
} catch (e) {
console.error("Can't get header from docs file", i.docs, (e as Error).message);
return undefined;
}
const docsBody = markdown.getContent(docsContent); const docsBody = markdown.getContent(docsContent);
if (!docsHeader.name) { if (!docsHeader.name) {