Skip to content

Commit

Permalink
[assembler] fix native-image on Windows. Fixes #774
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Feb 23, 2022
1 parent 1bb330e commit 3f1337a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ private Artifact nativeImage(Path assembleDirectory, Path graalPath, Set<Path> j
String finalImageName = imageName + "-" + platformReplaced;

String executable = assembler.getExecutable();
if (PlatformUtils.isWindows()) {
executable += ".exe";
}
context.getLogger().info("- {}", finalImageName);

Path image = assembleDirectory.resolve(executable).toAbsolutePath();
Expand Down Expand Up @@ -151,7 +154,7 @@ private Artifact nativeImage(Path assembleDirectory, Path graalPath, Set<Path> j
.map(Path::toString)
.collect(Collectors.joining(File.pathSeparator)));
}
cmd.arg("-H:Name=" + image.getFileName().toString());
cmd.arg("-H:Name=" + assembler.getExecutable());
context.getLogger().debug(String.join(" ", cmd.getArgs()));
executeCommand(image.getParent(), cmd);

Expand Down

0 comments on commit 3f1337a

Please sign in to comment.