Skip to content

Commit

Permalink
fix(app, ios): correctly handle firebase.json if it has UTF-8
Browse files Browse the repository at this point in the history
similar to a fix in react-native-google-mobile-ads
  • Loading branch information
mikehardy committed Sep 17, 2022
1 parent 364beb2 commit 4e3ac01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/app/ios_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function setPlistValue {

function getFirebaseJsonKeyValue () {
if [[ ${_RN_ROOT_EXISTS} ]]; then
ruby -e "require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']"
ruby -Ku -e "require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']"
else
echo ""
fi;
Expand Down Expand Up @@ -76,7 +76,7 @@ done

if [[ ${_SEARCH_RESULT} ]]; then
_JSON_OUTPUT_RAW=$(cat "${_SEARCH_RESULT}")
_RN_ROOT_EXISTS=$(ruby -e "require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]" || echo '')
_RN_ROOT_EXISTS=$(ruby -Ku -e "require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]" || echo '')

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

1 comment on commit 4e3ac01

@vercel
Copy link

@vercel vercel bot commented on 4e3ac01 Sep 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.