Skip to content

Commit 1e28462

Browse files
authored
fix: Sentry Module Collection Script Fails with Spaces in Node Path (#4559)
1 parent fc150fe commit 1e28462

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
### Fixes
3232

33+
- Sentry Module Collection Script Fails with Spaces in Node Path on iOS ([#4559](https://github.com/getsentry/sentry-react-native/pull/4559))
3334
- 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))
3435

3536
### Dependencies

packages/core/scripts/collect-modules.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if [[ -n "$NODE_BINARY" ]]; then
2828
nodePath="$NODE_BINARY"
2929
fi
3030

31-
thisFilePath=$(dirname $0)
31+
thisFilePath=$(dirname "$0")
3232
collectModulesScript="$thisFilePath/../dist/js/tools/collectModules.js"
3333

3434
destination="$CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH"
@@ -44,11 +44,11 @@ else
4444
modulesPaths="$MODULES_PATHS"
4545
fi
4646

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

54-
$nodePath "$collectModulesScript" "$sourceMap" "$modulesOutput" "$modulesPaths"
54+
"$nodePath" "$collectModulesScript" "$sourceMap" "$modulesOutput" "$modulesPaths"

0 commit comments

Comments
 (0)