From 75a5d1debb8793a572ab495361b613138b452bb2 Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Tue, 24 Sep 2024 10:13:50 +0200 Subject: [PATCH] fix: Ignore stderr output from git command (#613) --- packages/bundler-plugin-core/src/utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/bundler-plugin-core/src/utils.ts b/packages/bundler-plugin-core/src/utils.ts index 67bef553..948d51c8 100644 --- a/packages/bundler-plugin-core/src/utils.ts +++ b/packages/bundler-plugin-core/src/utils.ts @@ -198,7 +198,10 @@ export function stringToUUID(str: string): string { function gitRevision(): string | undefined { let gitRevision: string | undefined; try { - gitRevision = childProcess.execSync("git rev-parse HEAD").toString().trim(); + gitRevision = childProcess + .execSync("git rev-parse HEAD", { stdio: ["ignore", "pipe", "ignore"] }) + .toString() + .trim(); } catch (e) { // noop }