From 5734699b87ccbfbf7761345cb88ae1ab07e9c2fe Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Sat, 7 Sep 2024 10:43:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D0=BF=D1=8B=D1=82=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B8=D1=82=D1=8C=20=D0=B2?= =?UTF-8?q?=D1=80=D0=B5=D0=BC=D1=8F=20=D0=BC=D0=B0=D1=82=D0=B5=D1=80=D0=B8?= =?UTF-8?q?=D0=B0=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- quartz/plugins/transformers/lastmod.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/quartz/plugins/transformers/lastmod.ts b/quartz/plugins/transformers/lastmod.ts index 4d8805086..e8f53f644 100644 --- a/quartz/plugins/transformers/lastmod.ts +++ b/quartz/plugins/transformers/lastmod.ts @@ -63,12 +63,13 @@ export const CreatedModifiedDate: QuartzTransformerPlugin> = (u } try { - modified ||= await repo.getFileLatestModifiedDateAsync(fullFp!) + const status = await repo.getStatusAsync(); + modified ||= await repo.getFileLatestModifiedDateAsync(fullFp!); + console.log(chalk.green(`Git repository found at: ${status.tracked.includes(fullFp)}`)); } catch { console.log( chalk.yellow( - `\nWarning: ${file.data - .filePath!} isn't yet tracked by git, last modification date is not available for this file`, + `\nWarning: ${fullFp!} isn't yet tracked by git, last modification date is not available for this file`, ), ) }