status-react/scripts/check-metro-shadow-process.sh
Siddarth Kumar c9b3196203
improve make component-test robustness (#17743)
Many times devs run
`make component-test` or `make component-test-watch` when there is already a metro or clojure terminal running on their system.

This causes weird behaviour and it is advised to not run these commands together.

This commit prevents that and shows a warning.
2023-10-26 23:24:23 +05:30

16 lines
462 B
Bash
Executable File

#!/usr/bin/env bash
if pgrep -f 'shadow-cljs watch mobile' > /dev/null; then
echo "Error: make run-clojure is already running in another terminal" >&2
echo "Please close that terminal before running this command." >&2
exit 1
fi
if pgrep -f 'react-native start' > /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
fi
exit 0