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

Only overwrite ANDROID_AVD_HOME if not set #405

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Only overwrite ANDROID_AVD_HOME if not set
The path might point to a different path than what
android-emulator-runner expects, like when XDG_CONFIG_HOME
is set.
tmpsantos committed Sep 27, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit a51cec297685ac44272f0c1a0b94c76d71f210b9
6 changes: 4 additions & 2 deletions src/sdk-installer.ts
Original file line number Diff line number Diff line change
@@ -35,8 +35,10 @@ export async function installAndroidSdk(apiLevel: string, target: string, arch:
// add paths for commandline-tools and platform-tools
core.addPath(`${cmdlineToolsPath}/latest:${cmdlineToolsPath}/latest/bin:${process.env.ANDROID_HOME}/platform-tools`);

// set standard AVD path
core.exportVariable('ANDROID_AVD_HOME', `${process.env.HOME}/.android/avd`);
// set standard AVD path if not set
if (!process.env.ANDROID_AVD_HOME) {
core.exportVariable('ANDROID_AVD_HOME', `${process.env.HOME}/.android/avd`);
}

// accept all Android SDK licenses
await exec.exec(`sh -c \\"yes | sdkmanager --licenses > /dev/null"`);