mirror of
https://github.com/apple/pkl.git
synced 2026-03-27 03:21:13 +01:00
Make commands classes instead of objects (#946)
Making these classes caused native-image to statically initialize them at build time, which included CLI argument default values (like working dir). This turns them back into classes. Co-authored-by: Islon Scherer <islonscherer@gmail.com>
This commit is contained in:
@@ -23,7 +23,8 @@ import org.pkl.commons.cli.CliException
|
||||
class CliMainTest {
|
||||
@Test
|
||||
fun `CLI run test`() {
|
||||
val e = assertThrows<CliException> { DocCommand.parse(arrayOf("foo", "--output-dir", "/tmp")) }
|
||||
val e =
|
||||
assertThrows<CliException> { DocCommand().parse(arrayOf("foo", "--output-dir", "/tmp")) }
|
||||
assertThat(e)
|
||||
.hasMessageContaining("must contain at least one module named `doc-package-info.pkl`")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user