This commit is contained in:
Evgenii Korolevskii 2022-11-17 13:16:34 +01:00
parent 4966150d90
commit d5d37d43c2
2 changed files with 14 additions and 2 deletions

9
dist/setup/index.js vendored
View File

@ -105031,7 +105031,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const fs_1 = __importDefault(__nccwpck_require__(7147));
const core = __importStar(__nccwpck_require__(2186));
const auth = __importStar(__nccwpck_require__(3497));
const util_1 = __nccwpck_require__(2629);
@ -105044,7 +105048,6 @@ function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
const versions = core.getMultilineInput(constants.INPUT_JAVA_VERSION);
core.info(versions.join(" "));
const distributionName = core.getInput(constants.INPUT_DISTRIBUTION, { required: true });
const architecture = core.getInput(constants.INPUT_ARCHITECTURE);
const packageType = core.getInput(constants.INPUT_JAVA_PACKAGE);
@ -105052,6 +105055,10 @@ function run() {
const cache = core.getInput(constants.INPUT_CACHE);
const checkLatest = util_1.getBooleanInput(constants.INPUT_CHECK_LATEST, false);
let toolchainIds = core.getMultilineInput(constants.INPUT_MVN_TOOLCHAIN_ID);
if (!versions.length) {
const contents = fs_1.default.readFileSync('.java-version').toString();
core.info(contents);
}
if (versions.length !== toolchainIds.length) {
toolchainIds = [];
}

View File

@ -1,3 +1,4 @@
import fs from "fs";
import * as core from '@actions/core';
import * as auth from './auth';
import { getBooleanInput, isCacheFeatureAvailable } from './util';
@ -11,7 +12,6 @@ import { JavaInstallerOptions } from './distributions/base-models';
async function run() {
try {
const versions = core.getMultilineInput(constants.INPUT_JAVA_VERSION);
core.info(versions.join(" "))
const distributionName = core.getInput(constants.INPUT_DISTRIBUTION, { required: true });
const architecture = core.getInput(constants.INPUT_ARCHITECTURE);
const packageType = core.getInput(constants.INPUT_JAVA_PACKAGE);
@ -20,6 +20,11 @@ async function run() {
const checkLatest = getBooleanInput(constants.INPUT_CHECK_LATEST, false);
let toolchainIds = core.getMultilineInput(constants.INPUT_MVN_TOOLCHAIN_ID);
if (!versions.length) {
const contents = fs.readFileSync('.java-version').toString();
core.info(contents)
}
if (versions.length !== toolchainIds.length) {
toolchainIds = [];
}