mirror of
https://github.com/actions/setup-java.git
synced 2026-06-30 09:08:12 +00:00
Compare commits
1 Commits
b7f7085e9e
...
e55d70dab9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e55d70dab9 |
@ -356,9 +356,7 @@ describe('GraalVMDistribution', () => {
|
|||||||
// Verify the error is thrown with the expected message
|
// Verify the error is thrown with the expected message
|
||||||
await expect(
|
await expect(
|
||||||
(distribution as any).findPackageForDownload('17.0.99')
|
(distribution as any).findPackageForDownload('17.0.99')
|
||||||
).rejects.toThrow(
|
).rejects.toThrow("No matching version found for SemVer '17.0.99'");
|
||||||
"No matching GraalVM version found for SemVer '17.0.99'. Available versions can be found at https://download.oracle.com/graalvm/. Pick a version from the list."
|
|
||||||
);
|
|
||||||
|
|
||||||
// Verify the hint about checking the base URL is included
|
// Verify the hint about checking the base URL is included
|
||||||
await expect(
|
await expect(
|
||||||
|
|||||||
7
dist/setup/index.js
vendored
7
dist/setup/index.js
vendored
@ -113217,9 +113217,10 @@ class GraalVMDistribution extends base_installer_1.JavaBase {
|
|||||||
handleHttpResponse(response, range) {
|
handleHttpResponse(response, range) {
|
||||||
const statusCode = response.message.statusCode;
|
const statusCode = response.message.statusCode;
|
||||||
if (statusCode === http_client_1.HttpCodes.NotFound) {
|
if (statusCode === http_client_1.HttpCodes.NotFound) {
|
||||||
throw new Error(`No matching GraalVM version found for SemVer '${range}'.` +
|
// Create the standard error with additional hint about checking the download URL
|
||||||
` Available versions can be found at ${GRAALVM_DL_BASE}/.` +
|
const error = this.createVersionNotFoundError(range);
|
||||||
` Pick a version from the list.`);
|
error.message += `\nPlease check if this version is available at ${GRAALVM_DL_BASE}`;
|
||||||
|
throw error;
|
||||||
}
|
}
|
||||||
if (statusCode === http_client_1.HttpCodes.Unauthorized ||
|
if (statusCode === http_client_1.HttpCodes.Unauthorized ||
|
||||||
statusCode === http_client_1.HttpCodes.Forbidden) {
|
statusCode === http_client_1.HttpCodes.Forbidden) {
|
||||||
|
|||||||
@ -149,11 +149,10 @@ export class GraalVMDistribution extends JavaBase {
|
|||||||
const statusCode = response.message.statusCode;
|
const statusCode = response.message.statusCode;
|
||||||
|
|
||||||
if (statusCode === HttpCodes.NotFound) {
|
if (statusCode === HttpCodes.NotFound) {
|
||||||
throw new Error(
|
// Create the standard error with additional hint about checking the download URL
|
||||||
`No matching GraalVM version found for SemVer '${range}'.` +
|
const error = this.createVersionNotFoundError(range);
|
||||||
` Available versions can be found at ${GRAALVM_DL_BASE}/.` +
|
error.message += `\nPlease check if this version is available at ${GRAALVM_DL_BASE}`;
|
||||||
` Pick a version from the list.`
|
throw error;
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user