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

@@ -337,7 +337,7 @@ export class FlipperServerImpl implements FlipperServer {
},
'android-get-emulators': async () => this.android.getAndroidEmulators(),
'android-launch-emulator': async (name, coldBoot) =>
launchEmulator(name, coldBoot),
launchEmulator(this.config.settings.androidHome, name, coldBoot),
'ios-get-simulators': async (bootedOnly) =>
this.ios.getSimulators(bootedOnly),
'ios-launch-simulator': async (udid) => launchSimulator(udid),