From 8ad63714ed3070aa9fdf95b702d89ef8fb423d9d Mon Sep 17 00:00:00 2001 From: Dmitry Rykun Date: Wed, 10 Aug 2022 05:24:41 -0700 Subject: [PATCH] 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 --- scripts/react-native-xcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/react-native-xcode.sh b/scripts/react-native-xcode.sh index 54d9e404305d1f..88e72e4f0b2ad3 100755 --- a/scripts/react-native-xcode.sh +++ b/scripts/react-native-xcode.sh @@ -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