From 5bc02fcca3a4e2f95a1141a884a5cd49573101e9 Mon Sep 17 00:00:00 2001 From: sharpchen Date: Tue, 24 Sep 2024 20:29:04 +0800 Subject: [PATCH] grrr --- docs/services/SidebarService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/services/SidebarService.ts b/docs/services/SidebarService.ts index 4aee0536..c11ff396 100644 --- a/docs/services/SidebarService.ts +++ b/docs/services/SidebarService.ts @@ -45,7 +45,7 @@ class SidebarService implements ISidebarService { } function gitTrackedDate(file: string): Date { const dateStr = execSync( - `git log --diff-filter=A --format="%cI" -- '${path.join(documentRoot().fullName, file)}.md'`, + `git log --diff-filter=A --format="%cI" -- '${path.join(documentRoot().parent!.fullName, file)}.md'`, ) .toString() .trim(); @@ -58,7 +58,7 @@ class SidebarService implements ISidebarService { `'${path.join(documentRoot().fullName, file)}.md'`, ]).stdout.toString(); */ console.log( - `current command: ${`git log --diff-filter=A --format="%cI" -- "${path.join(documentRoot().fullName, file)}.md"`}`, + `current command: ${`git log --diff-filter=A --format="%cI" -- '${path.join(documentRoot().fullName, file)}.md'`}`, ); console.log(`current timestamp: ${dateStr}`); const foo = new Date(dateStr);