mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 02:16:45 +00:00
Fix Windows archives extraction issue
This commit is contained in:
parent
40b9536ce5
commit
0b70bb777b
15 changed files with 4450 additions and 4400 deletions
|
@ -8,7 +8,8 @@ import semver from 'semver';
|
|||
import {
|
||||
extractJdkFile,
|
||||
getDownloadArchiveExtension,
|
||||
isVersionSatisfies
|
||||
isVersionSatisfies,
|
||||
renameWinArchive
|
||||
} from '../../util';
|
||||
import * as core from '@actions/core';
|
||||
import {ArchitectureOptions, LibericaVersion, OsVersions} from './models';
|
||||
|
@ -35,13 +36,8 @@ export class LibericaDistributions extends JavaBase {
|
|||
|
||||
core.info(`Extracting Java archive...`);
|
||||
const extension = getDownloadArchiveExtension();
|
||||
if (
|
||||
process.platform === 'win32' &&
|
||||
(this.architecture === 'arm64' || this.architecture === 'aarch64')
|
||||
) {
|
||||
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
|
||||
await fs.renameSync(javaArchivePath, javaArchivePathRenamed);
|
||||
javaArchivePath = javaArchivePathRenamed;
|
||||
if (process.platform === 'win32') {
|
||||
javaArchivePath = renameWinArchive(javaArchivePath);
|
||||
}
|
||||
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue