Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Android preferences root path on Windows #558

Merged
merged 15 commits into from
Nov 26, 2020
Prev Previous commit
Next Next commit
Fix PR comments
  • Loading branch information
jpkleemans committed Nov 26, 2020
commit ef527f149254e05d1cb37a2f8eb2585e3000d9aa
4 changes: 2 additions & 2 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ async function getAndroidPrefsRoot () {
}

if (location) {
log.warn(`The value of $ANDROID_EMULATOR_HOME '${location}' is not an existing directory`);
log.warn(`The value of the ANDROID_EMULATOR_HOME environment variable '${location}' is not an existing directory`);
}

const home = process.env.HOME || process.env.USERPROFILE;
jpkleemans marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -872,7 +872,7 @@ async function getAndroidPrefsRoot () {

/**
* Check if a path exists on the filesystem and is a directory
*
*
* @param {?string} location The full path to the directory
* @returns {boolean}
*/
Expand Down
8 changes: 7 additions & 1 deletion lib/tools/adb-emu-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async function listEmulators () {
}

if (avdsRoot) {
log.warn(`The value of $ANDROID_AVD_HOME '${location}' is not an existing directory`);
log.warn(`The value of the ANDROID_AVD_HOME environment variable '${avdsRoot}' is not an existing directory`);
}

const prefsRoot = await getAndroidPrefsRoot();
Expand All @@ -88,6 +88,12 @@ async function listEmulators () {
return await getAvdConfigPaths(avdsRoot);
}

/**
* Get configuration paths of all virtual devices
*
* @param {string} avdsRoot path to the directory that contains the AVD .ini files
* @returns {Array<EmuInfo>}
*/
async function getAvdConfigPaths (avdsRoot) {
jpkleemans marked this conversation as resolved.
Show resolved Hide resolved
const configs = await fs.glob('*.ini', {
cwd: avdsRoot,
Expand Down