tweak: allow for overriding metro server port
This commit is contained in:
parent
6a7f04a5a8
commit
c541e4437f
|
@ -6,7 +6,7 @@ if pgrep -f 'shadow-cljs watch mobile' > /dev/null; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if pgrep -f 'react-native start' > /dev/null; then
|
||||
if pgrep -f "react-native start --port=$RCT_METRO_PORT" > /dev/null; then
|
||||
echo "Error: make run-metro is already running in another terminal" >&2
|
||||
echo "Please close that terminal before running this command." >&2
|
||||
exit 1
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if pgrep -f 'react-native start' > /dev/null; then
|
||||
if pgrep -f "react-native start --port=$RCT_METRO_PORT" > /dev/null; then
|
||||
echo "Info: metro is already running in another terminal"
|
||||
else
|
||||
echo "Info: starting a new metro terminal"
|
||||
react-native start --reset-cache
|
||||
react-native start --port=$RCT_METRO_PORT --reset-cache
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue