Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: Change default short option to display version from "-V" to "-v" #17621

Merged
merged 1 commit into from
Jun 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions devtools/cli/src/main/java/io/quarkus/cli/QuarkusCli.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public class QuarkusCli implements QuarkusApplication, Callable<Integer> {

static {
System.setProperty("picocli.endofoptions.description", "End of command line options.");
// Change default short option to display version from "-V" to "-v":
System.setProperty("picocli.version.name.0", "-v");
}

@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public void testCommandVersion() throws Exception {
CliDriver.Result result = CliDriver.execute("version");
result.echoSystemOut();

CliDriver.Result result2 = CliDriver.execute("-V");
CliDriver.Result result2 = CliDriver.execute("-v");
Assertions.assertEquals(result.stdout, result2.stdout, "Version output for command aliases should be the same.");
CliDriver.println("-- same as above\n\n");

Expand Down