From 7d4e94edccfc2f642fcbd1d6aa00756f02e3a525 Mon Sep 17 00:00:00 2001 From: Ryan Sundberg Date: Thu, 25 Oct 2018 00:50:16 -0700 Subject: [PATCH] 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 https://github.com/getsentry/react-native-sentry/issues/484 https://github.com/getsentry/react-native-sentry/issues/389 Pull Request resolved: https://github.com/facebook/react-native/pull/21383 Differential Revision: D10851141 Pulled By: yungsters fbshipit-source-id: f46853ac8b57957864e0d1a76b8513403223fccb --- scripts/react-native-xcode.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/react-native-xcode.sh b/scripts/react-native-xcode.sh index bc8382dc422eed..98ba523aaa2900 100755 --- a/scripts/react-native-xcode.sh +++ b/scripts/react-native-xcode.sh @@ -102,11 +102,11 @@ nodejs_not_found() exit 2 } -type $NODE_BINARY >/dev/null 2>&1 || nodejs_not_found +type "$NODE_BINARY" >/dev/null 2>&1 || nodejs_not_found BUNDLE_FILE="$DEST/main.jsbundle" -$NODE_BINARY "$CLI_PATH" $BUNDLE_COMMAND \ +"$NODE_BINARY" "$CLI_PATH" $BUNDLE_COMMAND \ $CONFIG_ARG \ --entry-file "$ENTRY_FILE" \ --platform ios \