mirror of
https://github.com/actions/setup-java.git
synced 2025-04-19 09:26:46 +00:00
add debug line
This commit is contained in:
parent
c000d4c923
commit
dbc0c85f6f
2 changed files with 14 additions and 3 deletions
8
dist/setup/index.js
vendored
8
dist/setup/index.js
vendored
|
@ -123967,9 +123967,15 @@ class MicrosoftDistributions extends base_installer_1.JavaBase {
|
||||||
downloadTool(javaRelease) {
|
downloadTool(javaRelease) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`);
|
core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`);
|
||||||
const javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
let javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
||||||
|
core.info(`javaArchivePath is ${javaArchivePath}`);
|
||||||
core.info(`Extracting Java archive...`);
|
core.info(`Extracting Java archive...`);
|
||||||
const extension = (0, util_1.getDownloadArchiveExtension)();
|
const extension = (0, util_1.getDownloadArchiveExtension)();
|
||||||
|
if (process.platform === 'win32' && (this.architecture === 'arm64' || this.architecture === 'aarch64')) {
|
||||||
|
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
|
||||||
|
yield fs_1.default.renameSync(javaArchivePath, javaArchivePathRenamed);
|
||||||
|
javaArchivePath = javaArchivePathRenamed;
|
||||||
|
}
|
||||||
const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension);
|
const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension);
|
||||||
const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0];
|
const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0];
|
||||||
const archivePath = path_1.default.join(extractedJavaPath, archiveName);
|
const archivePath = path_1.default.join(extractedJavaPath, archiveName);
|
||||||
|
|
|
@ -26,10 +26,15 @@ export class MicrosoftDistributions extends JavaBase {
|
||||||
core.info(
|
core.info(
|
||||||
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
|
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
|
||||||
);
|
);
|
||||||
const javaArchivePath = await tc.downloadTool(javaRelease.url);
|
let javaArchivePath = await tc.downloadTool(javaRelease.url);
|
||||||
|
core.info(`javaArchivePath is ${javaArchivePath}`);
|
||||||
core.info(`Extracting Java archive...`);
|
core.info(`Extracting Java archive...`);
|
||||||
const extension = getDownloadArchiveExtension();
|
const extension = getDownloadArchiveExtension();
|
||||||
|
if (process.platform === 'win32' && (this.architecture === 'arm64' || this.architecture === 'aarch64')) {
|
||||||
|
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
|
||||||
|
await fs.renameSync(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