mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 01:46:46 +00:00
Map temurin arch names to node os.arch() names
This commit is contained in:
parent
73887824bb
commit
b090764394
1 changed files with 12 additions and 0 deletions
|
@ -20,6 +20,7 @@ export class TemurinDistribution extends JavaBase {
|
|||
private readonly jvmImpl: TemurinImplementation
|
||||
) {
|
||||
super(`Temurin-${jvmImpl}`, installerOptions);
|
||||
installerOptions.architecture = this.osArchToDistributionArch(installerOptions.architecture);
|
||||
}
|
||||
|
||||
protected async findPackageForDownload(version: string): Promise<JavaDownloadRelease> {
|
||||
|
@ -152,4 +153,15 @@ export class TemurinDistribution extends JavaBase {
|
|||
return process.platform;
|
||||
}
|
||||
}
|
||||
|
||||
private osArchToDistributionArch(osArch: string): string {
|
||||
let dArch;
|
||||
switch (osArch) {
|
||||
case 'amd64': dArch = 'x64'; break;
|
||||
case 'ia32': dArch = 'x32'; break;
|
||||
case 'arm64': dArch = 'aarch64'; break;
|
||||
default: dArch = osArch;
|
||||
}
|
||||
return dArch;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue