Skip to content

Commit

Permalink
Make CLI executable configurable
Browse files Browse the repository at this point in the history
Summary:
Follow up to facebook#13248 for iOS.

This pull request allows changing the default path to `cli` when running from Xcode environment. That is especially useful when debugging from a different location or... running `Haul`.

Set `export CLI_PATH=./node_modules/react-native/local-cli/cli.js` and run. Should use new path provided.
Closes facebook#13264

Differential Revision: D4819059

Pulled By: ericvicenti

fbshipit-source-id: 4a6241823c0bc8f1fa16869bc872bdbe04df510f
  • Loading branch information
grabbou authored and facebook-github-bot committed Apr 3, 2017
1 parent cc2ec6f commit dcecfa3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packager/react-native-xcode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ fi

[ -z "$NODE_BINARY" ] && export NODE_BINARY="node"

[ -z "$CLI_PATH" ] && export CLI_PATH="$REACT_NATIVE_DIR/local-cli/cli.js"

nodejs_not_found()
{
echo "error: Can't find '$NODE_BINARY' binary to build React Native bundle" >&2
Expand Down Expand Up @@ -85,7 +87,7 @@ fi

BUNDLE_FILE="$DEST/main.jsbundle"

$NODE_BINARY "$REACT_NATIVE_DIR/local-cli/cli.js" bundle \
$NODE_BINARY $CLI_PATH bundle \
--entry-file "$ENTRY_FILE" \
--platform ios \
--dev $DEV \
Expand Down

0 comments on commit dcecfa3

Please sign in to comment.