fix(content-docs): do not echo git history to console (#5906)

This commit is contained in:
Joshua Chen 2021-11-08 21:03:21 +08:00 committed by GitHub
parent a835c9bc48
commit f12c390a17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,9 @@ 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}`,