Map temurin arch names to node os.arch() names
This commit is contained in:
parent
73887824bb
commit
b090764394
@ -20,6 +20,7 @@ export class TemurinDistribution extends JavaBase {
|
|||||||
private readonly jvmImpl: TemurinImplementation
|
private readonly jvmImpl: TemurinImplementation
|
||||||
) {
|
) {
|
||||||
super(`Temurin-${jvmImpl}`, installerOptions);
|
super(`Temurin-${jvmImpl}`, installerOptions);
|
||||||
|
installerOptions.architecture = this.osArchToDistributionArch(installerOptions.architecture);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async findPackageForDownload(version: string): Promise<JavaDownloadRelease> {
|
protected async findPackageForDownload(version: string): Promise<JavaDownloadRelease> {
|
||||||
@ -152,4 +153,15 @@ export class TemurinDistribution extends JavaBase {
|
|||||||
return process.platform;
|
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…
x
Reference in New Issue
Block a user