From 7a6cb59c8d4c428b0a54a7fc7f32299b22890fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kry=C5=A1tof=20Wold=C5=99ich?= <31292499+krystofwoldrich@users.noreply.github.com> Date: Mon, 15 Jan 2024 16:53:46 +0100 Subject: [PATCH] fix(xcode): node can't be overwritten in `sentry-xcode-debug-files.sh` (#3523) --- CHANGELOG.md | 1 + scripts/sentry-xcode-debug-files.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd18fedff0..b33a400328 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,6 +63,7 @@ see [the Expo guide](https://docs.sentry.io/platforms/react-native/manual-setup/ - Remove Native Modules warning from platform where the absence is expected ([#3466](https://github.com/getsentry/sentry-react-native/pull/3466)) - Add Expo Context information using Expo Native Modules ([#3466](https://github.com/getsentry/sentry-react-native/pull/3466)) - Errors from InternalBytecode.js are no longer marked as in_app ([#3518](https://github.com/getsentry/sentry-react-native/pull/3518)) +- Fix system node can't be overwritten in `sentry-xcode-debug-files.sh` ([#3523](https://github.com/getsentry/sentry-react-native/pull/3523)) ## 5.16.0-alpha.4 diff --git a/scripts/sentry-xcode-debug-files.sh b/scripts/sentry-xcode-debug-files.sh index 164aba24e5..0ba9a54d9c 100755 --- a/scripts/sentry-xcode-debug-files.sh +++ b/scripts/sentry-xcode-debug-files.sh @@ -5,14 +5,14 @@ # print commands before executing them and stop on first error set -x -e -LOCAL_NODE_BINARY=${NODE_BINARY:-node} - # load envs if loader file exists (since rn 0.68) WITH_ENVIRONMENT="../node_modules/react-native/scripts/xcode/with-environment.sh" if [ -f "$WITH_ENVIRONMENT" ]; then . "$WITH_ENVIRONMENT" fi +LOCAL_NODE_BINARY=${NODE_BINARY:-node} + [ -z "$SENTRY_PROPERTIES" ] && export SENTRY_PROPERTIES=sentry.properties [ -z "$SENTRY_CLI_EXECUTABLE" ] && SENTRY_CLI_PACKAGE_PATH=$("$LOCAL_NODE_BINARY" --print "require('path').dirname(require.resolve('@sentry/cli/package.json'))")