Skip to content
Prev Previous commit
Next Next commit
Try to reproduce
  • Loading branch information
ychescale9 committed Oct 10, 2024
commit 56b52d24dff6d2e7a51db916aaba173f7de06b5e
4 changes: 4 additions & 0 deletions src/sdk-installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ export async function installAndroidSdk(apiLevel: string, target: string, arch:
const isOnMac = process.platform === 'darwin';
const isArm = process.arch === 'arm64';

if (!isOnMac) {
await exec.exec(`sh -c \\"sudo chown $USER:$USER ${process.env.ANDROID_HOME} -R`);
}

const cmdlineToolsPath = `${process.env.ANDROID_HOME}/cmdline-tools`;
if (!fs.existsSync(cmdlineToolsPath)) {
console.log('Installing new cmdline-tools.');
Expand Down