Skip to content

Commit ce25c54

Browse files
sundbrykelset
authored andcommitted
Quote "$NODE_BINARY" in react-native-xcode.sh (#21383)
Summary: Fix build errors when path to $NODE_BINARY contains spaces: error: Can't find '/Path/With Spaces/To/node' binary to build React Native bundle Why would $NODE_BINARY contain spaces? In my case, I am using sentry-cli which wraps the NODE_BINARY in it's own executable. The local path to the project, and thus the $NODE_BINARY, contains a space on my GoCD build agent. '/Users/go/Library/Application Support/Go Agent/pipelines/my-ios-app/node_modules/sentry/cli/sentry-cli See getsentry/sentry-react-native#484 getsentry/sentry-react-native#389 Pull Request resolved: #21383 Differential Revision: D10851141 Pulled By: yungsters fbshipit-source-id: f46853ac8b57957864e0d1a76b8513403223fccb
1 parent 5d28300 commit ce25c54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/react-native-xcode.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ nodejs_not_found()
8888
exit 2
8989
}
9090

91-
type $NODE_BINARY >/dev/null 2>&1 || nodejs_not_found
91+
type "$NODE_BINARY" >/dev/null 2>&1 || nodejs_not_found
9292

9393
# Print commands before executing them (useful for troubleshooting)
9494
set -x
@@ -105,7 +105,7 @@ fi
105105

106106
BUNDLE_FILE="$DEST/main.jsbundle"
107107

108-
$NODE_BINARY "$CLI_PATH" $BUNDLE_COMMAND \
108+
"$NODE_BINARY" "$CLI_PATH" $BUNDLE_COMMAND \
109109
$CONFIG_ARG \
110110
--entry-file "$ENTRY_FILE" \
111111
--platform ios \

0 commit comments

Comments
 (0)