Switch to using settings for android sdk location
Summary: A settings screen has been added where android home can be set. This changes the downstream code to use this value rather than the `env.PATH` variable. Reviewed By: passy Differential Revision: D17713288 fbshipit-source-id: 51551652c9c2f468e1117c18785123348e4b4576
This commit is contained in:
committed by
Facebook Github Bot
parent
85c0ec0d13
commit
729e74f2fc
@@ -10,17 +10,6 @@ const os = require('os');
|
||||
const fs = require('fs');
|
||||
|
||||
module.exports = function(argv) {
|
||||
if (!process.env.ANDROID_HOME) {
|
||||
process.env.ANDROID_HOME = '/opt/android_sdk';
|
||||
}
|
||||
|
||||
// emulator/emulator is more reliable than tools/emulator, so prefer it if
|
||||
// it exists
|
||||
process.env.PATH =
|
||||
['emulator', 'tools', 'platform-tools']
|
||||
.map(directory => `${process.env.ANDROID_HOME}/${directory}`)
|
||||
.join(':') + `:${process.env.PATH}`;
|
||||
|
||||
// ensure .flipper folder and config exist
|
||||
const flipperDir = path.join(os.homedir(), '.flipper');
|
||||
if (!fs.existsSync(flipperDir)) {
|
||||
|
||||
Reference in New Issue
Block a user