tns run android command fails when there are no Android emulators available. The problem is that the output of avdmanager list avds is incorrectly parsed by CLI and it fails (output is Available Android Virtual Devices:\n).
Fix this by improving the parsing logic.
Also fix incorrect checks for executables on Windows - the files have .bat extension, which was not added, so the check if the file exist was failing.
Unify the calls to adb devices - curently there are two implementations on different places in the code - unify them and add a new method that does not fail in case adb devices command fails. The new method is usable when we want to list currently available simulators/emulators.
tns run android
command fails when there are no Android emulators available. The problem is that the output ofavdmanager list avds
is incorrectly parsed by CLI and it fails (output isAvailable Android Virtual Devices:\n
). Fix this by improving the parsing logic. Also fix incorrect checks for executables on Windows - the files have.bat
extension, which was not added, so the check if the file exist was failing. Unify the calls toadb devices
- curently there are two implementations on different places in the code - unify them and add a new method that does not fail in caseadb devices
command fails. The new method is usable when we want to list currently available simulators/emulators.