Fix emulator usage on linux

Summary: emulator isn't on the path in CI machines, but we already have ANDROID_HOME set so we can work out where it is.

Reviewed By: danielbuechele

Differential Revision: D15080422

fbshipit-source-id: 2c50a3de27909d2bfc82ea0210d06a0cc32357d7
This commit is contained in:
John Knox
2019-04-26 03:39:02 -07:00
committed by Facebook Github Bot
parent 221bf1cc75
commit a4164c89a0
2 changed files with 19 additions and 16 deletions

View File

@@ -40,6 +40,7 @@ class DevicesButton extends Component<Props> {
// On Linux, you must run the emulator from the directory it's in because
// reasons ...
whichPromise('emulator')
.catch(e => `${process.env.ANDROID_HOME || ''}/tools/emulator`)
.then(emulatorPath => {
const child = spawn(emulatorPath, [`@${name}`], {
detached: true,