Skip to content

Commit 00aea8d

Browse files
committed
Use consistent env name
1 parent 9296992 commit 00aea8d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/utils/logger.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
import { createRequire } from 'node:module';
2121
// Note: Removed "import * as Sentry from '@sentry/node'" to prevent native module loading at import time
2222

23-
const SENTRY_ENABLED = process.env.SENTRY_DISABLED !== 'true';
23+
const SENTRY_ENABLED =
24+
process.env.SENTRY_DISABLED !== 'true' && process.env.XCODEBUILDMCP_SENTRY_DISABLED !== 'true';
2425

2526
function isTestEnv(): boolean {
2627
return (
@@ -58,7 +59,11 @@ function withSentry(cb: (s: SentryModule) => void): void {
5859
}
5960

6061
if (!SENTRY_ENABLED) {
61-
log('info', 'Sentry disabled due to SENTRY_DISABLED environment variable');
62+
if (process.env.SENTRY_DISABLED === 'true') {
63+
log('info', 'Sentry disabled due to SENTRY_DISABLED environment variable');
64+
} else if (process.env.XCODEBUILDMCP_SENTRY_DISABLED === 'true') {
65+
log('info', 'Sentry disabled due to XCODEBUILDMCP_SENTRY_DISABLED environment variable');
66+
}
6267
}
6368

6469
/**

0 commit comments

Comments
 (0)