From a20b6434b3b3fc4d1865c34b45d413e3867f65c0 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Fri, 18 Nov 2022 10:14:55 +0100 Subject: [PATCH] Improve error msg when dev builds cannot be found. Fixes #22. --- dist/main/index.js | 2 +- src/graalvm.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/main/index.js b/dist/main/index.js index ef60ccd..b97dbcb 100644 --- a/dist/main/index.js +++ b/dist/main/index.js @@ -74738,7 +74738,7 @@ function setUpGraalVMDevBuild(gdsToken, javaVersion) { return utils_1.downloadAndExtractJDK(asset.browser_download_url); } } - throw new Error('Could not find GraalVM dev build'); + throw new Error(`Could not find GraalVM dev build for Java ${javaVersion}. It may no longer be available, so please consider upgrading the Java version. If you think this is a mistake, please file an issue at: https://github.com/graalvm/setup-graalvm/issues.`); }); } exports.setUpGraalVMDevBuild = setUpGraalVMDevBuild; diff --git a/src/graalvm.ts b/src/graalvm.ts index d1c5446..577e612 100644 --- a/src/graalvm.ts +++ b/src/graalvm.ts @@ -52,7 +52,9 @@ export async function setUpGraalVMDevBuild( return downloadAndExtractJDK(asset.browser_download_url) } } - throw new Error('Could not find GraalVM dev build') + throw new Error( + `Could not find GraalVM dev build for Java ${javaVersion}. It may no longer be available, so please consider upgrading the Java version. If you think this is a mistake, please file an issue at: https://github.com/graalvm/setup-graalvm/issues.` + ) } export async function setUpGraalVMRelease(