mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-21 10:37:51 +02:00
fix(content-docs): quotify path when retrieving git history (#6202)
* fix(content-docs): quotify path when retrieving git history * Enable last update in dogfooding
This commit is contained in:
parent
7fcadd0c36
commit
3195e7feed
7 changed files with 69 additions and 3 deletions
|
@ -43,12 +43,12 @@ export async function getFileLastUpdate(
|
|||
return null;
|
||||
}
|
||||
|
||||
const result = shell.exec(`git log -1 --format=%ct,%an ${filePath}`, {
|
||||
const result = shell.exec(`git log -1 --format=%ct,%an "${filePath}"`, {
|
||||
silent: true,
|
||||
});
|
||||
if (result.code !== 0) {
|
||||
throw new Error(
|
||||
`Retrieval of git history failed at ${filePath} with exit code ${result.code}: ${result.stderr}`,
|
||||
`Retrieval of git history failed at "${filePath}" with exit code ${result.code}: ${result.stderr}`,
|
||||
);
|
||||
}
|
||||
return getTimestampAndAuthor(result.stdout.trim());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue