Skip to content

Commit

Permalink
fix(expo): Upload script should not log out env file not found errors (
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich authored Dec 3, 2024
1 parent f6c37bb commit 9282172
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
### Fixes

- Return `lastEventId` export from `@sentry/core` ([#4315](https://github.com/getsentry/sentry-react-native/pull/4315))
- Don't log file not found errors when loading envs in `sentry-expo-upload-sourcemaps` ([#4332](https://github.com/getsentry/sentry-react-native/pull/4332))
- Navigation Span should have no parent by default ([#4326](https://github.com/getsentry/sentry-react-native/pull/4326))

### Dependencies
Expand Down
8 changes: 6 additions & 2 deletions packages/core/scripts/expo-upload-sourcemaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,12 @@ function loadDotenv(dotenvPath) {

Object.assign(process.env, dotenvResult);
} catch (error) {
console.warn('⚠️ Failed to load environment variables using dotenv.');
console.warn(error);
if (error.code === 'ENOENT') {
// noop if file does not exist
} else {
console.warn('⚠️ Failed to load environment variables using dotenv.');
console.warn(error);
}
}
}

Expand Down

0 comments on commit 9282172

Please sign in to comment.