Преглед изворни кода

android: fix adb reverse command in case of non-default port

j8
Saúl Ibarra Corretgé пре 4 година
родитељ
комит
eabcc078ef
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1
    1
      android/scripts/run-packager.sh

+ 1
- 1
android/scripts/run-packager.sh Прегледај датотеку

8
 export RCT_METRO_PORT="${RCT_METRO_PORT:=8081}"
8
 export RCT_METRO_PORT="${RCT_METRO_PORT:=8081}"
9
 echo "export RCT_METRO_PORT=${RCT_METRO_PORT}" > "${THIS_DIR}/../../node_modules/react-native/scripts/.packager.env"
9
 echo "export RCT_METRO_PORT=${RCT_METRO_PORT}" > "${THIS_DIR}/../../node_modules/react-native/scripts/.packager.env"
10
 
10
 
11
-adb reverse tcp:8081 tcp:8081
11
+adb reverse tcp:$RCT_METRO_PORT tcp:$RCT_METRO_PORT
12
 
12
 
13
 if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then
13
 if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then
14
   if ! curl -s "http://localhost:${RCT_METRO_PORT}/status" | grep -q "packager-status:running" ; then
14
   if ! curl -s "http://localhost:${RCT_METRO_PORT}/status" | grep -q "packager-status:running" ; then

Loading…
Откажи
Сачувај