From 66cc80962ba3b89e4bc3a4f0510f387a1b80afd1 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 31 Oct 2025 12:19:32 +0100 Subject: [PATCH] fix showSignature --- website/vcs.ts | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/website/vcs.ts b/website/vcs.ts index dfdb67688d..62590bc8ae 100644 --- a/website/vcs.ts +++ b/website/vcs.ts @@ -40,10 +40,12 @@ async function getAllNewestCommitDate(cwd: string): Promise { const result = await execa( 'git', [ - 'log', // Do not include GPG signature in the log output // See https://github.com/facebook/docusaurus/pull/10022 - '-c log.showSignature=false', + '-c', + 'log.showSignature=false', + // The git command we want to run + 'log', // Format each history entry as t: '--format=t:%ct,a:%an', // In each entry include the name and status for each modified file @@ -131,6 +133,10 @@ function createCustomVcsConfig(): VcsConfig { return DEFAULT_VCS_CONFIG; } + if (process.env.NODE_ENV !== 'production') { + return DEFAULT_VCS_CONFIG; + } + let repoInfoPromise: Promise | null = null; async function getRepoInfoForFile( @@ -147,15 +153,13 @@ function createCustomVcsConfig(): VcsConfig { return { initialize: ({siteDir}) => { - if (process.env.NODE_ENV === 'production') { - // Only pre-init for production builds - getRepoInfoForFile(siteDir).catch((error) => { - console.error( - 'Failed to initialize the custom Docusaurus site Git VCS', - error, - ); - }); - } + // Only pre-init for production builds + getRepoInfoForFile(siteDir).catch((error) => { + console.error( + 'Failed to initialize the custom Docusaurus site Git VCS', + error, + ); + }); }, getFileCreationInfo: async (filePath: string) => {