mirror of
https://github.com/actions/setup-java.git
synced 2026-07-02 18:41:53 +00:00
Compare commits
1 Commits
8b1cb90567
...
f887b74d76
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f887b74d76 |
@ -508,7 +508,7 @@ describe('GraalVMDistribution', () => {
|
|||||||
await expect(
|
await expect(
|
||||||
(distribution as any).findPackageForDownload('23')
|
(distribution as any).findPackageForDownload('23')
|
||||||
).rejects.toThrow(
|
).rejects.toThrow(
|
||||||
"No EA build is marked as 'latest' for version range '23-ea'. Available EA versions: 23-ea-20240716."
|
"Could not find satisfied version for SemVer '23-ea'"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Verify error logging - removed as we now use the helper method which doesn't call core.error
|
// Verify error logging - removed as we now use the helper method which doesn't call core.error
|
||||||
@ -718,9 +718,7 @@ describe('GraalVMDistribution', () => {
|
|||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
(distribution as any).findEABuildDownloadUrl('23-ea')
|
(distribution as any).findEABuildDownloadUrl('23-ea')
|
||||||
).rejects.toThrow(
|
).rejects.toThrow("Could not find satisfied version for SemVer '23-ea'");
|
||||||
"No EA build is marked as 'latest' for version range '23-ea'. Available EA versions: 23-ea-20240716, 23-ea-20240709."
|
|
||||||
);
|
|
||||||
|
|
||||||
// Verify error logging - removed as we now use the helper method which doesn't call core.error
|
// Verify error logging - removed as we now use the helper method which doesn't call core.error
|
||||||
});
|
});
|
||||||
|
|||||||
8
dist/setup/index.js
vendored
8
dist/setup/index.js
vendored
@ -112584,7 +112584,7 @@ class JavaBase {
|
|||||||
const maxVersionsToShow = core.isDebug() ? availableVersions.length : 50;
|
const maxVersionsToShow = core.isDebug() ? availableVersions.length : 50;
|
||||||
const versionsToShow = availableVersions.slice(0, maxVersionsToShow);
|
const versionsToShow = availableVersions.slice(0, maxVersionsToShow);
|
||||||
const truncated = availableVersions.length > maxVersionsToShow;
|
const truncated = availableVersions.length > maxVersionsToShow;
|
||||||
parts.push(`Available versions: ${versionsToShow.join(', ')}${truncated ? ', ...' : ''}`);
|
parts.push(`Available versions: ${versionsToShow.join(', ')}${truncated ? '...' : ''}`);
|
||||||
if (truncated) {
|
if (truncated) {
|
||||||
parts.push(`(showing first ${maxVersionsToShow} of ${availableVersions.length} versions, enable debug mode to see all)`);
|
parts.push(`(showing first ${maxVersionsToShow} of ${availableVersions.length} versions, enable debug mode to see all)`);
|
||||||
}
|
}
|
||||||
@ -113238,11 +113238,7 @@ class GraalVMDistribution extends base_installer_1.JavaBase {
|
|||||||
const latestVersion = versions.find(v => v.latest);
|
const latestVersion = versions.find(v => v.latest);
|
||||||
if (!latestVersion) {
|
if (!latestVersion) {
|
||||||
const availableVersions = versions.map(v => v.version);
|
const availableVersions = versions.map(v => v.version);
|
||||||
let message = `No EA build is marked as 'latest' for version range '${javaEaVersion}'.`;
|
throw this.createVersionNotFoundError(javaEaVersion, availableVersions);
|
||||||
if (availableVersions.length > 0) {
|
|
||||||
message += ` Available EA versions: ${availableVersions.join(', ')}.`;
|
|
||||||
}
|
|
||||||
throw new Error(message);
|
|
||||||
}
|
}
|
||||||
core.debug(`Latest version found: ${latestVersion.version}`);
|
core.debug(`Latest version found: ${latestVersion.version}`);
|
||||||
const arch = this.distributionArchitecture();
|
const arch = this.distributionArchitecture();
|
||||||
|
|||||||
@ -282,7 +282,7 @@ export abstract class JavaBase {
|
|||||||
const truncated = availableVersions.length > maxVersionsToShow;
|
const truncated = availableVersions.length > maxVersionsToShow;
|
||||||
|
|
||||||
parts.push(
|
parts.push(
|
||||||
`Available versions: ${versionsToShow.join(', ')}${truncated ? ', ...' : ''}`
|
`Available versions: ${versionsToShow.join(', ')}${truncated ? '...' : ''}`
|
||||||
);
|
);
|
||||||
|
|
||||||
if (truncated) {
|
if (truncated) {
|
||||||
|
|||||||
@ -182,11 +182,7 @@ export class GraalVMDistribution extends JavaBase {
|
|||||||
const latestVersion = versions.find(v => v.latest);
|
const latestVersion = versions.find(v => v.latest);
|
||||||
if (!latestVersion) {
|
if (!latestVersion) {
|
||||||
const availableVersions = versions.map(v => v.version);
|
const availableVersions = versions.map(v => v.version);
|
||||||
let message = `No EA build is marked as 'latest' for version range '${javaEaVersion}'.`;
|
throw this.createVersionNotFoundError(javaEaVersion, availableVersions);
|
||||||
if (availableVersions.length > 0) {
|
|
||||||
message += ` Available EA versions: ${availableVersions.join(', ')}.`;
|
|
||||||
}
|
|
||||||
throw new Error(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
core.debug(`Latest version found: ${latestVersion.version}`);
|
core.debug(`Latest version found: ${latestVersion.version}`);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user