Default architecture param to os.arch()

This commit is contained in:
Wes Morgan 2022-08-29 10:37:16 -06:00
parent 5b36705a13
commit 73887824bb
No known key found for this signature in database
GPG key ID: 5639E4CBFA17DC84

View file

@ -6,12 +6,13 @@ import { restore } from './cache';
import * as path from 'path'; import * as path from 'path';
import { getJavaDistribution } from './distributions/distribution-factory'; import { getJavaDistribution } from './distributions/distribution-factory';
import { JavaInstallerOptions } from './distributions/base-models'; import { JavaInstallerOptions } from './distributions/base-models';
import * as os from 'os';
async function run() { async function run() {
try { try {
const version = core.getInput(constants.INPUT_JAVA_VERSION, { required: true }); const version = core.getInput(constants.INPUT_JAVA_VERSION, { required: true });
const distributionName = core.getInput(constants.INPUT_DISTRIBUTION, { required: true }); const distributionName = core.getInput(constants.INPUT_DISTRIBUTION, { required: true });
const architecture = core.getInput(constants.INPUT_ARCHITECTURE); const architecture = core.getInput(constants.INPUT_ARCHITECTURE) || os.arch();
const packageType = core.getInput(constants.INPUT_JAVA_PACKAGE); const packageType = core.getInput(constants.INPUT_JAVA_PACKAGE);
const jdkFile = core.getInput(constants.INPUT_JDK_FILE); const jdkFile = core.getInput(constants.INPUT_JDK_FILE);
const cache = core.getInput(constants.INPUT_CACHE); const cache = core.getInput(constants.INPUT_CACHE);