mirror of
https://github.com/actions/setup-java.git
synced 2025-04-19 09:26:46 +00:00
add comment
This commit is contained in:
parent
d98fd1728d
commit
c2317c0941
2 changed files with 11 additions and 0 deletions
5
dist/setup/index.js
vendored
5
dist/setup/index.js
vendored
|
@ -123970,6 +123970,11 @@ class MicrosoftDistributions extends base_installer_1.JavaBase {
|
||||||
let javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
let javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
||||||
core.info(`Extracting Java archive...`);
|
core.info(`Extracting Java archive...`);
|
||||||
const extension = (0, util_1.getDownloadArchiveExtension)();
|
const extension = (0, util_1.getDownloadArchiveExtension)();
|
||||||
|
// Rename archive to add extension because after downloading
|
||||||
|
// archive does not contain extension type and it leads to some issues
|
||||||
|
// on Windows runners without PowerShell Core.
|
||||||
|
//
|
||||||
|
// For default PowerShell Windows it should contain extension type to unpack it.
|
||||||
if (process.platform === 'win32' &&
|
if (process.platform === 'win32' &&
|
||||||
(this.architecture === 'arm64' || this.architecture === 'aarch64')) {
|
(this.architecture === 'arm64' || this.architecture === 'aarch64')) {
|
||||||
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
|
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
|
||||||
|
|
|
@ -30,6 +30,11 @@ export class MicrosoftDistributions extends JavaBase {
|
||||||
|
|
||||||
core.info(`Extracting Java archive...`);
|
core.info(`Extracting Java archive...`);
|
||||||
const extension = getDownloadArchiveExtension();
|
const extension = getDownloadArchiveExtension();
|
||||||
|
// Rename archive to add extension because after downloading
|
||||||
|
// archive does not contain extension type and it leads to some issues
|
||||||
|
// on Windows runners without PowerShell Core.
|
||||||
|
//
|
||||||
|
// For default PowerShell Windows it should contain extension type to unpack it.
|
||||||
if (
|
if (
|
||||||
process.platform === 'win32' &&
|
process.platform === 'win32' &&
|
||||||
(this.architecture === 'arm64' || this.architecture === 'aarch64')
|
(this.architecture === 'arm64' || this.architecture === 'aarch64')
|
||||||
|
@ -38,6 +43,7 @@ export class MicrosoftDistributions extends JavaBase {
|
||||||
await fs.renameSync(javaArchivePath, javaArchivePathRenamed);
|
await fs.renameSync(javaArchivePath, javaArchivePathRenamed);
|
||||||
javaArchivePath = javaArchivePathRenamed;
|
javaArchivePath = javaArchivePathRenamed;
|
||||||
}
|
}
|
||||||
|
|
||||||
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);
|
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);
|
||||||
|
|
||||||
const archiveName = fs.readdirSync(extractedJavaPath)[0];
|
const archiveName = fs.readdirSync(extractedJavaPath)[0];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue