Fix USE_HERMES envvar check

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
This commit is contained in:
Dmitry Rykun
2022-08-10 05:24:41 -07:00
committed by Facebook GitHub Bot
parent 1a8ce7a26a
commit 03de19745e
+1 -1
View File
@@ -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