File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 2020import { 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
2526function isTestEnv ( ) : boolean {
2627 return (
@@ -58,7 +59,11 @@ function withSentry(cb: (s: SentryModule) => void): void {
5859}
5960
6061if ( ! 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/**
You can’t perform that action at this time.
0 commit comments