badoo / MVIKotlin

Extendable MVI framework for Kotlin Multiplatform with powerful debugging tools (logging and time travel), inspired by Badoo MVICore library
https://arkivanov.github.io/MVIKotlin
Apache License 2.0
828 stars 64 forks source link

Fix wrong adb path selection #281

Closed ema987 closed 3 years ago

ema987 commented 3 years ago

First of all, thank you very much for this amazing project!

Issue description:

Now you can't anymore select the right adb executable and you're stuck with an unusable app/plugin.

It looks like to me the right checks are in place to avoid select an executable which is not adb in the file selection dialogs but the filters/checks are not respected, at least on my Macbook with BigSur 11.4 and IntelliJIdea plugin version 3.0.0-alpha01.

I improved the adb path selection manually checking a file named adb is selected in the file selection dialog. Furthermore, everytime you start debugging, the code checks the selected path is an adb executable, otherwise it prompts you the file selection dialog.

This is a quick fix and unfortunately duplicated in some places.

IMHO, in a future version, it would be better to create a new button to make the user able to select the adb path anytime, so it can be changed when needed and some checks can be removed.

I hope this is useful!

arkivanov commented 3 years ago

Thank you very much for the fix! Seems like on macOS the file name filter is ignored and you can actually select any file. On Ubuntu (my machine) it works fine and allows only adb files to be selected.

ema987 commented 3 years ago

Thank you for the fast response! The code should now be fixed as you asked

arkivanov commented 3 years ago

Thanks for your contribution!