mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-21 02:27:49 +02:00
misc(plugin-docs): fix Windows test snapshot for git history retrieval (#5905)
* misc(plugin-docs): fix test snapshot * Fix again
This commit is contained in:
parent
334b4397e7
commit
a835c9bc48
2 changed files with 5 additions and 3 deletions
|
@ -43,8 +43,10 @@ export async function getFileLastUpdate(
|
|||
}
|
||||
|
||||
const result = shell.exec(`git log -1 --format=%ct,%an ${filePath}`);
|
||||
if (result.stderr) {
|
||||
throw new Error(result.stderr);
|
||||
if (result.code !== 0) {
|
||||
throw new Error(
|
||||
`Retrieval of git history failed at ${filePath} with exit code ${result.code}: ${result.stderr}`,
|
||||
);
|
||||
}
|
||||
return getTimestampAndAuthor(result.stdout.trim());
|
||||
} catch (error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue