Skip to content

Commit

Permalink
Use native-image.exe
Browse files Browse the repository at this point in the history
  • Loading branch information
Olafur Pall Geirsson committed Sep 8, 2020
1 parent e9ed827 commit 156d32f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plugin/src/main/scala/sbtnativeimage/NativeImagePlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,13 @@ object NativeImagePlugin extends AutoPlugin {
"true".equalsIgnoreCase(System.getProperty("native-image-installed")) ||
"true".equalsIgnoreCase(System.getenv("NATIVE_IMAGE_INSTALLED"))
) {
val path = Paths
val binary =
if (Properties.isWin) "native-image.exe" else "native-image"
val bin = Paths
.get(System.getenv("JAVA_HOME"))
.resolve("bin")
.resolve("native-image")
println(s"FILES: ${bin.toFile().listFiles().toList}")
val path = bin.resolve(binary)
Def.task(List[String](path.toString()))
} else {
Def.task {
Expand Down

0 comments on commit 156d32f

Please sign in to comment.