@@ -47557,9 +47557,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
47557
47557
Object.defineProperty(exports, "__esModule", { value: true });
47558
47558
const cache = __importStar(__webpack_require__(692));
47559
47559
const core = __importStar(__webpack_require__(470));
47560
+ const exec = __importStar(__webpack_require__(986));
47560
47561
const os = __importStar(__webpack_require__(87));
47561
47562
const sdk_manager_1 = __webpack_require__(857);
47562
47563
const utils_1 = __webpack_require__(611);
47564
+ const patchUbuntuPermissions = async (androidHome) => {
47565
+ core.startGroup("Patch permissions for $ANDROID_HOME on Ubuntu");
47566
+ await exec.exec("sudo", ["chmod", "-R", "a+rwx", androidHome]);
47567
+ core.endGroup();
47568
+ };
47563
47569
const restoreCache = async (sdkmanager, foundPackage) => {
47564
47570
core.startGroup("Trying to restore package from cache...");
47565
47571
const cacheKey = utils_1.getPackageCacheKey(foundPackage);
@@ -47589,6 +47595,9 @@ const run = async () => {
47589
47595
throw new Error("ANDROID_HOME env variable is not defined");
47590
47596
}
47591
47597
const sdkmanager = new sdk_manager_1.SDKManager(androidHome);
47598
+ if (os.platform() === "linux") {
47599
+ await patchUbuntuPermissions(androidHome);
47600
+ }
47592
47601
core.startGroup("Getting list of available components");
47593
47602
const allPackages = await sdkmanager.getAllPackagesInfo();
47594
47603
core.endGroup();
0 commit comments