Skip to content

Commit 115bbcd

Browse files
committed
Fix identification of the GraalVM executable
This commit fixes a bug with the identification of the native image executable, when the GraalVM JDK is found via a Gradle toolchain: it was looking for the executable at the root of the installation path instead of the `bin` directory.
1 parent 9c46449 commit 115bbcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

native-gradle-plugin/src/main/java/org/graalvm/buildtools/gradle/tasks/BuildNativeImageTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public void exec() {
190190
logger.lifecycle("Args are: " + args);
191191
}
192192
JavaInstallationMetadata metadata = options.getJavaLauncher().get().getMetadata();
193-
File executablePath = metadata.getInstallationPath().file(NATIVE_IMAGE_EXE).getAsFile();
193+
File executablePath = metadata.getInstallationPath().file("bin/" + NATIVE_IMAGE_EXE).getAsFile();
194194
if (!executablePath.exists() && getGraalVMHome().isPresent()) {
195195
executablePath = Paths.get(getGraalVMHome().get()).resolve("bin").resolve(NATIVE_IMAGE_EXE).toFile();
196196
}

0 commit comments

Comments
 (0)