From 1bbcbd55ff94087c0a86b87164c223cee302fe4e Mon Sep 17 00:00:00 2001 From: Kevin Gozali Date: Wed, 11 Nov 2020 22:37:30 -0800 Subject: [PATCH] Android OSS: fixed unbound variable error for codegen build script Summary: If $FBSOURCE_ENV isn't set, this failed with `/root/react-native/packages/react-native-codegen/android/../scripts/oss/build.sh: line 20: FBSOURCE_ENV: unbound variable`. This commit fixes https://app.circleci.com/pipelines/github/facebook/react-native/7080/workflows/5cf18a1f-e6d2-4648-8217-d42e9a61fef1/jobs/176451 Changelog: [Internal] Reviewed By: yungsters Differential Revision: D24912950 fbshipit-source-id: 113e3dd7f78c75fc3adea0b21c9e38910be8c065 --- packages/react-native-codegen/scripts/oss/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native-codegen/scripts/oss/build.sh b/packages/react-native-codegen/scripts/oss/build.sh index 09b62e80928..28fe87693b4 100755 --- a/packages/react-native-codegen/scripts/oss/build.sh +++ b/packages/react-native-codegen/scripts/oss/build.sh @@ -17,7 +17,7 @@ rm -rf "${CODEGEN_DIR:?}/lib" "${CODEGEN_DIR:?}/node_modules" YARN_BINARY="${YARN_BINARY:-$(command -v yarn)}" -if [[ "$FBSOURCE_ENV" -eq "1" ]]; then +if [[ ${FBSOURCE_ENV:-0} -eq 1 ]]; then # Custom FB-specific setup pushd "$CODEGEN_DIR" >/dev/null