Skip to content

Commit a4ec49c

Browse files
Krystof Woldrichblakef
authored andcommitted
fix(react-native-xcode): Use CONFIG_CMD if set (#46112)
Summary: In the recent 0.75 release I've noticed new `CONFIG_CMD` option in `react-native-xcode.sh`. But this option was not used. Insted when set `CONFIG_APP` was used. This seems like a bug. As the usage before this PR would be as follow: ```bash export CONFIG_CMD=true export CONFIG_APP="/path/to/node /path/to/node_modules/react-native/cli.js config" ``` After this PR ``` export CONFIG_CMD="/path/to/node /path/to/node_modules/react-native/cli.js config" ``` This PR also removed unused explicite `--config-cmd "$CONFIG"` flag, as this is always overwriten by the code above, by default to `--config-cmd" "$NODE_BINARY $NODE_ARGS $REACT_NATIVE_DIR/cli.js config`. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [iOS][Fixed] - Use CONFIG_CMD if set Pull Request resolved: #46112 Test Plan: I've set `CONFIG_CMD` and run Xcode Release build to check that the set command is executed. Reviewed By: christophpurrer Differential Revision: D61545010 Pulled By: blakef fbshipit-source-id: ebbf8ebc08404bc6816277518a3b86c6f7e41e6e
1 parent 8ec6722 commit a4ec49c

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎packages/react-native/scripts/react-native-xcode.sh‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,14 @@ fi
141141
if [[ -n "$CONFIG_JSON" ]]; then
142142
EXTRA_ARGS+=("--load-config" "$CONFIG_JSON")
143143
elif [[ -n "$CONFIG_CMD" ]]; then
144-
EXTRA_ARGS+=("--config-cmd" "$CONFIG_APP")
144+
EXTRA_ARGS+=("--config-cmd" "$CONFIG_CMD")
145145
else
146146
EXTRA_ARGS+=("--config-cmd" "$NODE_BINARY $NODE_ARGS $REACT_NATIVE_DIR/cli.js config")
147147
fi
148148

149149
# shellcheck disable=SC2086
150150
"$NODE_BINARY" $NODE_ARGS "$CLI_PATH" $BUNDLE_COMMAND \
151151
$CONFIG_ARG \
152-
--config-cmd "$CONFIG" \
153152
--entry-file "$ENTRY_FILE" \
154153
--platform "$BUNDLE_PLATFORM" \
155154
--dev $DEV \

0 commit comments

Comments
 (0)