From a64a800182a1925d46b3c3c5f431cefb2c953684 Mon Sep 17 00:00:00 2001 From: D Date: Thu, 2 May 2024 17:16:58 +0300 Subject: [PATCH] fix: check when use 'set -e' --- scripts/start-emulator.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/start-emulator.sh b/scripts/start-emulator.sh index 8f9db5c..2299e6f 100644 --- a/scripts/start-emulator.sh +++ b/scripts/start-emulator.sh @@ -25,8 +25,8 @@ socat tcp-listen:"$ADB_PORT",bind="$LOCAL_IP",fork tcp:127.0.0.1:"$ADB_PORT" & export USER=root # Creating the Android Virtual Emulator. -TEST_AVD=$(avdmanager list avd | grep "android") -if [ -n "$TEST_AVD" ]; then +TEST_AVD=$(avdmanager list avd | grep -c "android.avd" || true) +if [ "$TEST_AVD" == "1" ]; then echo "Use the exists Android Virtual Emulator ..." else echo "Creating the Android Virtual Emulator ..."