Skip to content

Commit

Permalink
fix: Sentry Module Collection Script Fails with Spaces in Node Path (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
avarayr authored Feb 20, 2025
1 parent fc150fe commit 1e28462
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

### Fixes

- Sentry Module Collection Script Fails with Spaces in Node Path on iOS ([#4559](https://github.com/getsentry/sentry-react-native/pull/4559))
- Various crashes and issues of Session Replay on Android. See the Android SDK version bump for more details. ([#4529](https://github.com/getsentry/sentry-react-native/pull/4529))

### Dependencies
Expand Down
8 changes: 4 additions & 4 deletions packages/core/scripts/collect-modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if [[ -n "$NODE_BINARY" ]]; then
nodePath="$NODE_BINARY"
fi

thisFilePath=$(dirname $0)
thisFilePath=$(dirname "$0")
collectModulesScript="$thisFilePath/../dist/js/tools/collectModules.js"

destination="$CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH"
Expand All @@ -44,11 +44,11 @@ else
modulesPaths="$MODULES_PATHS"
fi

type $nodePath >/dev/null 2>&1 || {
if ! command -v "$nodePath" >/dev/null 2>&1; then
echo >&2 "error: $nodePath not found! Modules won't be collected." \
"Please export NODE_BINARY in 'Build Phase' - 'Bundle React Native code and images'" \
"to an absolute path of your node binary. Check your node path by 'which node'."
exit 0 # Don't fail the build but inform about the problem
}
fi

$nodePath "$collectModulesScript" "$sourceMap" "$modulesOutput" "$modulesPaths"
"$nodePath" "$collectModulesScript" "$sourceMap" "$modulesOutput" "$modulesPaths"

0 comments on commit 1e28462

Please sign in to comment.