File tree Expand file tree Collapse file tree 4 files changed +18
-4
lines changed
packages/core/scripts/eas Expand file tree Collapse file tree 4 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -45,4 +45,7 @@ async function main() {
4545 await runHook ( 'on-complete' , ( ) => hooks . captureEASBuildComplete ( options ) ) ;
4646}
4747
48- main ( ) ;
48+ main ( ) . catch ( error => {
49+ console . error ( '[Sentry] Unexpected error in eas-build-on-complete hook:' , error ) ;
50+ process . exit ( 1 ) ;
51+ } ) ;
Original file line number Diff line number Diff line change @@ -35,4 +35,7 @@ async function main() {
3535 await runHook ( 'on-error' , ( ) => hooks . captureEASBuildError ( options ) ) ;
3636}
3737
38- main ( ) ;
38+ main ( ) . catch ( error => {
39+ console . error ( '[Sentry] Unexpected error in eas-build-on-error hook:' , error ) ;
40+ process . exit ( 1 ) ;
41+ } ) ;
Original file line number Diff line number Diff line change @@ -37,4 +37,7 @@ async function main() {
3737 await runHook ( 'on-success' , ( ) => hooks . captureEASBuildSuccess ( options ) ) ;
3838}
3939
40- main ( ) ;
40+ main ( ) . catch ( error => {
41+ console . error ( '[Sentry] Unexpected error in eas-build-on-success hook:' , error ) ;
42+ process . exit ( 1 ) ;
43+ } ) ;
Original file line number Diff line number Diff line change @@ -87,7 +87,12 @@ function parseBaseOptions() {
8787 // Parse additional tags if provided
8888 if ( process . env . SENTRY_EAS_BUILD_TAGS ) {
8989 try {
90- options . tags = JSON . parse ( process . env . SENTRY_EAS_BUILD_TAGS ) ;
90+ const parsed = JSON . parse ( process . env . SENTRY_EAS_BUILD_TAGS ) ;
91+ if ( parsed && typeof parsed === 'object' && ! Array . isArray ( parsed ) ) {
92+ options . tags = parsed ;
93+ } else {
94+ console . warn ( '[Sentry] SENTRY_EAS_BUILD_TAGS must be a JSON object (e.g., {"key":"value"}). Ignoring.' ) ;
95+ }
9196 } catch ( _e ) {
9297 console . warn ( '[Sentry] Could not parse SENTRY_EAS_BUILD_TAGS as JSON. Ignoring.' ) ;
9398 }
You can’t perform that action at this time.
0 commit comments