Skip to content

Commit 97abe0a

Browse files
authored
fix(sveltekit): Fix git SHA not being picked up for release (#14540)
Fixes getsentry/sentry-javascript-bundler-plugins#634
1 parent ecc91bc commit 97abe0a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: packages/sveltekit/src/vite/sourceMaps.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,10 @@ function getFiles(dir: string): string[] {
269269
function detectSentryRelease(): string {
270270
let releaseFallback: string;
271271
try {
272-
releaseFallback = child_process.execSync('git rev-parse HEAD', { stdio: 'ignore' }).toString().trim();
272+
releaseFallback = child_process
273+
.execSync('git rev-parse HEAD', { stdio: ['ignore', 'pipe', 'ignore'] })
274+
.toString()
275+
.trim();
273276
} catch (_) {
274277
// the command can throw for various reasons. Most importantly:
275278
// - git is not installed

0 commit comments

Comments
 (0)