Skip to content

Commit

Permalink
don't cause double .exe suffix when creating native image (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindberg authored Jul 6, 2022
1 parent 2b7c78e commit 4de9d3f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/src/main/scala/bleep/scripts/GenNativeImage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ object GenNativeImage {
nativeImageJvm = started.rawBuild.jvm.getOrElse(model.Jvm.graalvm)
) {
override val nativeImageOutput = args.headOption match {
case Some(value) =>
started.prebootstrapped.buildPaths.cwd / value
case Some(relPath) =>
val relPathNoExe = if (relPath.endsWith(".exe")) relPath.dropRight(".exe".length) else relPath
started.prebootstrapped.buildPaths.cwd / relPathNoExe
case None => super.nativeImageOutput
}
}
Expand Down

0 comments on commit 4de9d3f

Please sign in to comment.