From 3840618a013002bd076d7469d468bd1b8937eaf6 Mon Sep 17 00:00:00 2001 From: Hank Brekke Date: Fri, 26 May 2017 02:33:00 -0700 Subject: [PATCH] Fix Incorrect Build Script Bash False-Matching Summary: When attempting to inverse a Bash boolean, the `!` character converts the meaning to become `[[ ! -n false ]]` (checking that the string "false" is empty) which never matches, and therefore this condition can never occur. See https://stackoverflow.com/a/2953673 Closes https://github.com/facebook/react-native/pull/14190 Differential Revision: D5137013 Pulled By: javache fbshipit-source-id: 7df52cc90a4ab79c7b5da54dbfb6c99fba3e8b80 --- 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 9271538e3..fd563fc29 100755 --- a/scripts/react-native-xcode.sh +++ b/scripts/react-native-xcode.sh @@ -100,7 +100,7 @@ $NODE_BINARY $CLI_PATH bundle \ --bundle-output "$BUNDLE_FILE" \ --assets-dest "$DEST" -if [[ ! $DEV && ! -f "$BUNDLE_FILE" ]]; then +if [[ $DEV != true && ! -f "$BUNDLE_FILE" ]]; then echo "error: File $BUNDLE_FILE does not exist. This must be a bug with" >&2 echo "React Native, please report it here: https://github.com/facebook/react-native/issues" exit 2