public Path installNativeImage()

in arthur-impl/src/main/java/org/apache/geronimo/arthur/impl/nativeimage/installer/SdkmanGraalVMInstaller.java [83:100]


    public Path installNativeImage() {
        final Path bin = requireNonNull(this.home, "No home, ensure to call install() before installNativeImage()")
                .resolve("bin");
        try {
            if (!findNativeImage(bin).isPresent()) { // likely only UNIx, windows comes with native-image.cmd
                log.info("Installing native-image");
                new ProcessExecutor(
                        configuration.isInheritIO(), asList(findGu(bin).toAbsolutePath().toString(), "install", "native-image"),
                        singletonMap("GRAALVM_HOME", home.toString())).run();
            } else {
                log.debug("native-image is already available");
            }
            return findNativeImage(bin)
                    .orElseThrow(() -> new IllegalArgumentException("No native-image found in " + bin));
        } catch (final IOException e) {
            throw new IllegalStateException(e);
        }
    }