Skip to content

Commit 5c752e7

Browse files
fix(app, ios): fail build with error if firebase.json has syntax errors
- if firebase.json parse has an error, don't substitute empty JSON, exit 1 instead - commit test app pod install result with updated script into test app project file
1 parent db0d036 commit 5c752e7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/app/ios_config.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ done
8888

8989
if [[ ${_SEARCH_RESULT} ]]; then
9090
_JSON_OUTPUT_RAW=$(cat "${_SEARCH_RESULT}")
91-
_RN_ROOT_EXISTS=$(ruby -Ku -e "require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]" || echo '')
91+
if ! _RN_ROOT_EXISTS=$(ruby -Ku -e "require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]"); then
92+
echo "error: Failed to parse firebase.json, check for syntax errors."
93+
exit 1
94+
fi
9295

9396
if [[ ${_RN_ROOT_EXISTS} ]]; then
9497
if ! python3 --version >/dev/null 2>&1; then echo "python3 not found, firebase.json file processing error." && exit 1; fi

0 commit comments

Comments
 (0)