Skip to content

Commit 03e22d9

Browse files
authored
fix: Sentry CLI executable path resolution that was causing iOS build script failures (#5003)
* Assign SENTRY_CLI_EXECUTABLE * Revert "Assign SENTRY_CLI_EXECUTABLE" This reverts commit 068a7bc. * Revert "Fix SDK Build when using PnPM (#4977)" This reverts commit 4f13db0. * Reapply "Fix SDK Build when using PnPM (#4977)" This reverts commit 3f77d3b. * Adds bin/sentry-cli in SENTRY_CLI_PACKAGE_PATH * Set SENTRY_CLI_PACKAGE_PATH in sentry-xcode.sh * Adds changelog * Set SENTRY_CLI_EXECUTABLE if not set (#5006) * Set SENTRY_CLI_EXECUTABLE if not set
1 parent d079998 commit 03e22d9

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
99
## Unreleased
1010

11+
### Fixes
12+
13+
- Fixed Sentry CLI executable path resolution that was causing iOS build script failures ([#5003](https://github.com/getsentry/sentry-react-native/pull/5003))
14+
1115
### Features
1216

1317
- Adds `replaysSessionQuality` Session Replay option to control replay quality and performance overhead on mobile ([#5001](https://github.com/getsentry/sentry-react-native/pull/5001))

packages/core/scripts/sentry-xcode-debug-files.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if [ -z "$SENTRY_CLI_EXECUTABLE" ]; then
3535
"$LOCAL_NODE_BINARY" --print "require('path').dirname(require.resolve('@sentry/cli/package.json'))" 2>/dev/null
3636
) || true
3737
if [ -n "$RESOLVED_PATH" ]; then
38-
SENTRY_CLI_PACKAGE_PATH="$RESOLVED_PATH"
38+
SENTRY_CLI_PACKAGE_PATH="$RESOLVED_PATH/bin/sentry-cli"
3939
else
4040
# Fallback: parse NODE_PATH from the .bin/sentry-cli shim (file generated by PNPM)
4141
PNPM_BIN_PATH="$PWD/../node_modules/@sentry/react-native/node_modules/.bin/sentry-cli"
@@ -50,6 +50,7 @@ if [ -z "$SENTRY_CLI_EXECUTABLE" ]; then
5050
fi
5151
fi
5252
fi
53+
[ -z "$SENTRY_CLI_EXECUTABLE" ] && SENTRY_CLI_EXECUTABLE="$SENTRY_CLI_PACKAGE_PATH"
5354

5455
[[ $SENTRY_INCLUDE_NATIVE_SOURCES == "true" ]] && INCLUDE_SOURCES_FLAG="--include-sources" || INCLUDE_SOURCES_FLAG=""
5556

packages/core/scripts/sentry-xcode.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if [ -z "$SENTRY_CLI_EXECUTABLE" ]; then
2222
"$LOCAL_NODE_BINARY" --print "require('path').dirname(require.resolve('@sentry/cli/package.json'))" 2>/dev/null
2323
) || true
2424
if [ -n "$RESOLVED_PATH" ]; then
25-
SENTRY_CLI_PACKAGE_PATH="$RESOLVED_PATH"
25+
SENTRY_CLI_PACKAGE_PATH="$RESOLVED_PATH/bin/sentry-cli"
2626
else
2727
# Fallback: parse NODE_PATH from the .bin/sentry-cli shim (file generated by PNPM)
2828
PNPM_BIN_PATH="$PWD/../node_modules/@sentry/react-native/node_modules/.bin/sentry-cli"
@@ -37,7 +37,7 @@ if [ -z "$SENTRY_CLI_EXECUTABLE" ]; then
3737
fi
3838
fi
3939
fi
40-
[ -z "$SENTRY_CLI_EXECUTABLE" ] && SENTRY_CLI_EXECUTABLE="${SENTRY_CLI_PACKAGE_PATH}/bin/sentry-cli"
40+
[ -z "$SENTRY_CLI_EXECUTABLE" ] && SENTRY_CLI_EXECUTABLE="$SENTRY_CLI_PACKAGE_PATH"
4141

4242
REACT_NATIVE_XCODE=$1
4343

0 commit comments

Comments
 (0)