Skip to content

Commit

Permalink
Quote "$NODE_BINARY" in react-native-xcode.sh (#21383)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sundbry authored and kelset committed Nov 7, 2018
1 parent 5d28300 commit ce25c54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/react-native-xcode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ 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

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

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 \
Expand Down

0 comments on commit ce25c54

Please sign in to comment.