Skip to content

Commit

Permalink
GROOVY-8588 use lowercase -v for --version in groovyc to be consisten…
Browse files Browse the repository at this point in the history
…t with other Groovy command line tools (closes #710)
  • Loading branch information
remkop authored and paulk-asert committed May 18, 2018
1 parent 86e27aa commit f197fcd
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ public static void commandLineCompile(String[] args, boolean lookupUnnamedFiles)

public static CommandLine configureParser(CompilationOptions options) {
CommandLine parser = new CommandLine(options);
parser.getCommandSpec().mixinStandardHelpOptions(true); // programmatically so these options appear last in usage help
parser.getCommandSpec().parser()
.unmatchedArgumentsAllowed(true)
.unmatchedOptionsArePositionalParams(true)
Expand Down Expand Up @@ -350,6 +349,12 @@ public static class CompilationOptions {
@Option(names = {"--configscript"}, paramLabel = "<script>", description = "A script for tweaking the configuration options")
private String configScript;

@Option(names = {"-h", "--help"}, usageHelp = true, description = "Show this help message and exit")
private boolean helpRequested;

@Option(names = {"-v", "--version"}, versionHelp = true, description = "Print version information and exit")
private boolean versionRequested;

@Parameters(description = "The groovy source files to compile, or @-files containing a list of source files to compile",
paramLabel = "<source-files>")
private List<String> files;
Expand Down

0 comments on commit f197fcd

Please sign in to comment.