Im facing an issue with how the log in docker compose looks like, seems somehow broken as shown below
==> Emulator is ready : '1'
is not completely override the previous output "please wait"
as you can see.
also the previous output is not being displayed in the output not sure why, here is my shell script function i have wrote
function check_emulator_status () {
printf "${G}==> ${BL}Checking emulator booting up status 🧐${NC}\n"
start_time=$(date +%s)
spinner=( "⠹" "⠺" "⠼" "⠶" "⠦" "⠧" "⠇" "⠏" )
i=0
while true; do
result=$(adb shell getprop sys.boot_completed 2>&1)
if [ "$result" == "1" ]; then
printf "${G}==> \u2713 Emulator is ready : '$result' ${NC}\n"
adb devices -l
adb shell input keyevent 82
break
elif [ "$result" == "" ]; then
printf "${YE}==> Emulator is partially Booted! 😕${NC}\r"
else
printf "${RED}==> $result, please wait ${spinner[$i]} ${NC}\r"
i=$(( (i+1) % 8 ))
fi
current_time=$(date +%s)
elapsed_time=$((current_time - start_time))
if [ $elapsed_time -gt 240 ]; then
printf "${RED}==> Timeout after 3 minutes elapsed 🕛.. ${NC}\n"
break
fi
sleep 0.2
done
};