Fix extracting Java from archive

This commit is contained in:
Daniil Razorenov 2021-11-10 11:47:08 +03:00
parent 1eb0ec886a
commit 221194fabc
2 changed files with 5 additions and 3 deletions

3
dist/setup/index.js vendored
View file

@ -38607,7 +38607,8 @@ class LibericaDistributions extends base_installer_1.JavaBase {
core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`);
const javaArchivePath = yield tc.downloadTool(javaRelease.url);
core.info(`Extracting Java archive...`);
const extractedJavaPath = yield util_1.extractJdkFile(javaArchivePath);
const extension = util_1.getDownloadArchiveExtension();
const extractedJavaPath = yield util_1.extractJdkFile(javaArchivePath, extension);
const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0];
const archivePath = path_1.default.join(extractedJavaPath, archiveName);
const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, this.getToolcacheVersionName(javaRelease.version), this.architecture);