Improve support for Mandrel distribution.

Fixes #48
This commit is contained in:
Fabio Niephaus
2023-06-20 11:56:28 +02:00
parent 85ea19c002
commit 578fd31702
3 changed files with 20 additions and 4 deletions

View File

@@ -51,9 +51,13 @@ async function run(): Promise<void> {
graalVMHome = await graalvm.setUpGraalVMJDKCE(javaVersion)
break
case c.DISTRIBUTION_MANDREL:
throw new Error(
`Mandrel requires the 'version' option (see https://github.com/graalvm/setup-graalvm/tree/main#options).`
)
if (graalvmVersion.startsWith(c.MANDREL_NAMESPACE)) {
graalVMHome = await setUpMandrel(graalvmVersion, javaVersion)
} else {
throw new Error(
`Mandrel requires the 'version' option (see https://github.com/graalvm/setup-graalvm/tree/main#options).`
)
}
case '':
if (javaVersion === c.VERSION_DEV) {
core.info(