From 914400f934bd64152d2ab0f7b10ea171b1e91d8d Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 2 Dec 2024 11:27:51 +0000 Subject: [PATCH] fix(sveltekit): Fix git SHA not being picked up for release --- packages/sveltekit/src/vite/sourceMaps.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/sveltekit/src/vite/sourceMaps.ts b/packages/sveltekit/src/vite/sourceMaps.ts index 9a5656f3f78f..b664e2d23db5 100644 --- a/packages/sveltekit/src/vite/sourceMaps.ts +++ b/packages/sveltekit/src/vite/sourceMaps.ts @@ -269,7 +269,10 @@ function getFiles(dir: string): string[] { function detectSentryRelease(): string { let releaseFallback: string; try { - releaseFallback = child_process.execSync('git rev-parse HEAD', { stdio: 'ignore' }).toString().trim(); + releaseFallback = child_process + .execSync('git rev-parse HEAD', { stdio: ['ignore', 'pipe', 'ignore'] }) + .toString() + .trim(); } catch (_) { // the command can throw for various reasons. Most importantly: // - git is not installed