mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 02:16:45 +00:00
Move os.arch() defaulter to JavaBase constructor
This commit is contained in:
parent
a115f58891
commit
cca7653671
2 changed files with 3 additions and 3 deletions
|
@ -7,6 +7,7 @@ import * as httpm from '@actions/http-client';
|
|||
import { getToolcachePath, isVersionSatisfies } from '../util';
|
||||
import { JavaDownloadRelease, JavaInstallerOptions, JavaInstallerResults } from './base-models';
|
||||
import { MACOS_JAVA_CONTENT_POSTFIX } from '../constants';
|
||||
import os from 'os';
|
||||
|
||||
export abstract class JavaBase {
|
||||
protected http: httpm.HttpClient;
|
||||
|
@ -25,7 +26,7 @@ export abstract class JavaBase {
|
|||
({ version: this.version, stable: this.stable } = this.normalizeVersion(
|
||||
installerOptions.version
|
||||
));
|
||||
this.architecture = installerOptions.architecture;
|
||||
this.architecture = installerOptions.architecture || os.arch();
|
||||
this.packageType = installerOptions.packageType;
|
||||
this.checkLatest = installerOptions.checkLatest;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue