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
This commit is contained in:
Hank Brekke 2017-05-26 02:33:00 -07:00 committed by Facebook Github Bot
parent ffdae135fd
commit 3840618a01
1 changed files with 1 additions and 1 deletions

View File

@ -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