Sdk path should be used when launching emulator

Summary:
Changelog: Fixed issue where a missing ANDROID_SDK_ROOT env var made it impossible to launch emulators

Run into an issue where ANDROID_SDK_ROOT wasn't set for my user, causing Flipper not to be able to launch emulator, which was looked up from the path rather than using the flipper settings.

Fixes: https://github.com/facebook/flipper/issues/3119

Reviewed By: timur-valiev

Differential Revision: D33158280

fbshipit-source-id: ea5616b10265ed43f1012c58da081be275ff1d5b
This commit is contained in:
Michel Weststrate
2021-12-16 14:49:46 -08:00
committed by Facebook GitHub Bot
parent 730d47932d
commit ef2a86e7a8
4 changed files with 37 additions and 50 deletions

View File

@@ -204,6 +204,7 @@ function setProcessState(settings: Settings) {
if (!process.env.ANDROID_HOME && !process.env.ANDROID_SDK_ROOT) {
process.env.ANDROID_HOME = androidHome;
process.env.ANDROID_SDK_ROOT = androidHome;
}
// emulator/emulator is more reliable than tools/emulator, so prefer it if