tweak: allow for overriding metro server port

This commit is contained in:
Sean Hagstrom 2024-05-28 09:55:27 +01:00
parent 6a7f04a5a8
commit c541e4437f
No known key found for this signature in database
GPG Key ID: 5257FEDF56307320
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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