Skip to content

Commit cac7c1f

Browse files
committed
fix(cli): recognize -o argument for native-image as outpath
Fixes: #1687 Signed-off-by: Sam Gammon <[email protected]>
1 parent 73ac8ee commit cac7c1f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/cli/src/main/kotlin/elide/tool/cli/cmd/tool/nativeImage/NativeImageAdapter.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,12 @@ import elide.tooling.project.ElideProject
151151
listOf(it)
152152
}
153153
}
154-
val outSpecPositionMinusOne = argsList.indexOf("-H:Path")
154+
val outSpecPositionMinusOne = (
155+
when (val idx = argsList.indexOf("-H:Path")) {
156+
-1 -> argsList.indexOf("-o")
157+
else -> idx
158+
}
159+
)
155160
val outSpec = if (outSpecPositionMinusOne < 0) {
156161
// come up with an output path; use `.dev/artifacts/native-image` by default
157162
// @TODO resolve from config

0 commit comments

Comments
 (0)