mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 09:56:46 +00:00
Default to runner architecture (#376)
This commit is contained in:
parent
a82e6d0020
commit
3617c43588
16 changed files with 303 additions and 42 deletions
|
@ -37,7 +37,8 @@ export class MicrosoftDistributions extends JavaBase {
|
|||
}
|
||||
|
||||
protected async findPackageForDownload(range: string): Promise<JavaDownloadRelease> {
|
||||
if (this.architecture !== 'x64' && this.architecture !== 'aarch64') {
|
||||
const arch = this.distributionArchitecture();
|
||||
if (arch !== 'x64' && arch !== 'aarch64') {
|
||||
throw new Error(`Unsupported architecture: ${this.architecture}`);
|
||||
}
|
||||
|
||||
|
@ -55,7 +56,7 @@ export class MicrosoftDistributions extends JavaBase {
|
|||
throw new Error('Could not load manifest for Microsoft Build of OpenJDK');
|
||||
}
|
||||
|
||||
const foundRelease = await tc.findFromManifest(range, true, manifest, this.architecture);
|
||||
const foundRelease = await tc.findFromManifest(range, true, manifest, arch);
|
||||
|
||||
if (!foundRelease) {
|
||||
throw new Error(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue