mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-21 22:16:24 +00:00
docs: proceed when version folder doesn't exist
A version folder may not exists (for example, when adding a new version). Proceed!
This commit is contained in:
@@ -1087,6 +1087,13 @@ async function produceDocumentationMetadata(version, apiData) {
|
||||
async function cleanupOldDocumentation(version) {
|
||||
const versionDir = `${outputPath}/${version}`;
|
||||
|
||||
try {
|
||||
await fs.stat(versionDir);
|
||||
}
|
||||
catch (err) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (const fn of await fs.readdir(versionDir)) {
|
||||
if (fn === '.metadata') {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user