From e4b2dca1f3f03bd951f1d623695631cebf638c67 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Tue, 5 Jul 2022 12:46:57 -0700 Subject: [PATCH] fix piped telemetry error output (#3822) --- .changeset/rare-elephants-add.md | 5 +++++ packages/telemetry/src/project-info.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/rare-elephants-add.md diff --git a/.changeset/rare-elephants-add.md b/.changeset/rare-elephants-add.md new file mode 100644 index 0000000000..7faa8e57b4 --- /dev/null +++ b/.changeset/rare-elephants-add.md @@ -0,0 +1,5 @@ +--- +'@astrojs/telemetry': patch +--- + +Fix an issue where handled error output was piped to the user diff --git a/packages/telemetry/src/project-info.ts b/packages/telemetry/src/project-info.ts index 5b35d910da..7666a8145d 100644 --- a/packages/telemetry/src/project-info.ts +++ b/packages/telemetry/src/project-info.ts @@ -67,7 +67,7 @@ function getProjectIdFromGit(): string | null { try { const originBuffer = execSync(`git rev-list --max-parents=0 HEAD`, { timeout: 500, - stdio: [0, 'pipe', 0], + stdio: ['ignore', 'pipe', 'ignore'], }); return String(originBuffer).trim(); } catch (_) {