Compare commits

..

1 Commits

Author SHA1 Message Date
gzfr
611f66d2b2
Merge e3fc7df67f into 67fbd726da 2024-08-10 22:56:44 +02:00
3 changed files with 10 additions and 15 deletions

View File

@ -207,7 +207,7 @@ describe('findPackageForDownload', () => {
});
distribution['getAvailableVersions'] = async () => [];
await expect(distribution['findPackageForDownload']('8')).rejects.toThrow(
`Unsupported architecture for IBM Semeru: ${arch} for your current OS version, the following are supported: x64, x86, ppc64le, ppc64, s390x, aarch64`
`Unsupported architecture for IBM Semeru: ${arch}, the following are supported: x64, x86, ppc64le, ppc64, s390x, aarch64`
);
}
);

11
dist/setup/index.js vendored
View File

@ -124939,9 +124939,8 @@ class SemeruDistribution extends base_installer_1.JavaBase {
}
findPackageForDownload(version) {
return __awaiter(this, void 0, void 0, function* () {
const arch = this.distributionArchitecture();
if (!supportedArchitectures.includes(arch)) {
throw new Error(`Unsupported architecture for IBM Semeru: ${this.architecture} for your current OS version, the following are supported: ${supportedArchitectures.join(', ')}`);
if (!supportedArchitectures.includes(this.architecture)) {
throw new Error(`Unsupported architecture for IBM Semeru: ${this.architecture}, the following are supported: ${supportedArchitectures.join(', ')}`);
}
if (!this.stable) {
throw new Error('IBM Semeru does not provide builds for early access versions');
@ -124975,7 +124974,7 @@ class SemeruDistribution extends base_installer_1.JavaBase {
const availableOptionsMessage = availableOptions
? `\nAvailable versions: ${availableOptions}`
: '';
throw new Error(`Could not find satisfied version for SemVer version '${version}' for your current OS version for ${this.architecture} architecture ${availableOptionsMessage}`);
throw new Error(`Could not find satisfied version for SemVer '${version}'. ${availableOptionsMessage}`);
}
return resolvedFullVersion;
});
@ -125000,7 +124999,7 @@ class SemeruDistribution extends base_installer_1.JavaBase {
getAvailableVersions() {
return __awaiter(this, void 0, void 0, function* () {
const platform = this.getPlatformOption();
const arch = this.distributionArchitecture();
const arch = this.architecture;
const imageType = this.packageType;
const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions
const releaseType = this.stable ? 'ga' : 'ea';
@ -127947,4 +127946,4 @@ module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"]
/******/ module.exports = __webpack_exports__;
/******/
/******/ })()
;
;

View File

@ -33,15 +33,11 @@ export class SemeruDistribution extends JavaBase {
protected async findPackageForDownload(
version: string
): Promise<JavaDownloadRelease> {
const arch = this.distributionArchitecture();
if (!supportedArchitectures.includes(arch)) {
if (!supportedArchitectures.includes(this.architecture)) {
throw new Error(
`Unsupported architecture for IBM Semeru: ${
this.architecture
} for your current OS version, the following are supported: ${supportedArchitectures.join(
', '
)}`
}, the following are supported: ${supportedArchitectures.join(', ')}`
);
}
@ -85,7 +81,7 @@ export class SemeruDistribution extends JavaBase {
? `\nAvailable versions: ${availableOptions}`
: '';
throw new Error(
`Could not find satisfied version for SemVer version '${version}' for your current OS version for ${this.architecture} architecture ${availableOptionsMessage}`
`Could not find satisfied version for SemVer '${version}'. ${availableOptionsMessage}`
);
}
@ -128,7 +124,7 @@ export class SemeruDistribution extends JavaBase {
public async getAvailableVersions(): Promise<ISemeruAvailableVersions[]> {
const platform = this.getPlatformOption();
const arch = this.distributionArchitecture();
const arch = this.architecture;
const imageType = this.packageType;
const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions
const releaseType = this.stable ? 'ga' : 'ea';