Skip to content

Commit

Permalink
Fix USE_HERMES envvar check
Browse files Browse the repository at this point in the history
Summary:
Hermes is enabled by default. We set `USE_HERMES` envvar to `false` to explicilty disable Hermes. The only valid way to check it would be to compare it against `false`. Everything else will produce invalid results if `USE_HERMES` is not defined. For example `$USE_HERMES != true` will turn into `'' != true`, which evaluates to `true`.
Due to this bug source maps were not generated by default.

Changelog:
[iOS][Fixed] - USE_HERMES envvar check fixed in react-native-xcode.sh. Now source maps are generated by default.

Reviewed By: cipolleschi

Differential Revision: D38571971

fbshipit-source-id: bc6b505c225c56d62ee773b401b66d821965e106
  • Loading branch information
Dmitry Rykun authored and facebook-github-bot committed Aug 10, 2022
1 parent 1a8ce7a commit 03de197
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/react-native-xcode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ fi
$EXTRA_ARGS \
$EXTRA_PACKAGER_ARGS

if [[ $USE_HERMES != true ]]; then
if [[ $USE_HERMES == false ]]; then
cp "$BUNDLE_FILE" "$DEST/"
BUNDLE_FILE="$DEST/main.jsbundle"
else
Expand Down

0 comments on commit 03de197

Please sign in to comment.