fixed lastmod.ts
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Struchkov Mark 2024-09-07 12:00:56 +03:00
parent 296787d242
commit 22f1b7a476
No known key found for this signature in database
GPG Key ID: A3F0AC3F0FA52F3C

View File

@ -71,14 +71,9 @@ export const CreatedModifiedDate: QuartzTransformerPlugin<Partial<Options>> = (u
}
try {
modified ||= await repo.getFileLatestModifiedDateAsync(file.data.filePath!)
} catch {
console.log(
chalk.yellow(
`\nWarning: ${file.data
.filePath!} isn't yet tracked by git, last modification date is not available for this file`,
),
)
modified ||= await repo.getFileLatestModifiedDateAsync(file.data.filePath!);
} catch (error) {
console.log(chalk.red(`Error retrieving latest modified date for ${file.data.filePath}: ${error.message}`));
}
}
}