You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It turns that when using picocli from groovy the following method signature
public static <T> T parse(T annotatedObject, String... args)
overrides
public List<Object> parse(String... args)
Thus in the following snippet it will try to invoke the static parse method interpreting the first string as the command object instead of a cli argument and resulting in an error.
CommandLine parser = new CommandLine(new TopCommand())
.addCommand("make", new MakeCmd())
.addCommand("docker", new DockerCmd())
.addCommand("cloud", new CloudCmd())
List cli = parser.parse('cloud','create')
This makes difficult to use picocli in a groovy based project. Any chance to rename the static parse to a different name eg parseCommand ?
The text was updated successfully, but these errors were encountered:
It turns that when using picocli from groovy the following method signature
overrides
Thus in the following snippet it will try to invoke the static
parse
method interpreting the first string as the command object instead of a cli argument and resulting in an error.This makes difficult to use picocli in a groovy based project. Any chance to rename the static
parse
to a different name egparseCommand
?The text was updated successfully, but these errors were encountered: