From 73887824bb07a384ee5011b84146449cef335287 Mon Sep 17 00:00:00 2001 From: Wes Morgan Date: Mon, 29 Aug 2022 10:37:16 -0600 Subject: [PATCH] Default architecture param to os.arch() --- src/setup-java.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/setup-java.ts b/src/setup-java.ts index 8274be9..6ec8efa 100644 --- a/src/setup-java.ts +++ b/src/setup-java.ts @@ -6,12 +6,13 @@ import { restore } from './cache'; import * as path from 'path'; import { getJavaDistribution } from './distributions/distribution-factory'; import { JavaInstallerOptions } from './distributions/base-models'; +import * as os from 'os'; async function run() { try { const version = core.getInput(constants.INPUT_JAVA_VERSION, { 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 jdkFile = core.getInput(constants.INPUT_JDK_FILE); const cache = core.getInput(constants.INPUT_CACHE);