Skip to content

Commit

Permalink
Merge pull request #164 from ielis/fix_varargs_cli_options
Browse files Browse the repository at this point in the history
Fix varargs CLI options
  • Loading branch information
ielis authored Apr 3, 2023
2 parents 84e4cde + 04a754f commit b051ea6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public static void main(String[] args) {
Locale.setDefault(Locale.US);
//noinspection InstantiationOfUtilityClass
CommandLine cline = new CommandLine(new Main())
.setUnmatchedOptionsArePositionalParams(false)
.setColorScheme(COLOR_SCHEME);
cline.getSubcommands().get("generate-completion").getCommandSpec().usageMessage().hidden(true);
System.exit(cline.execute(args));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ protected Integer execute() {

// (2) Convert into v2 format.
if (convertSection.convertVariants)
LOGGER.debug("Converting variants");
LOGGER.info("Converting variants");
else
LOGGER.info("Ignoring variants since the `--convert-variants` option is unset");

V1ToV2Converter converter = V1ToV2Converter.of(convertSection.convertVariants);
List<MessageAndPath> converted = new ArrayList<>(messages.size());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public static class ValidateSection {
public boolean includeHeader = false;

@CommandLine.Option(names = {"--require"},
arity = "*",
description = "Path to JSON schema with additional requirements to enforce.")
public List<Path> requirements = List.of();

Expand All @@ -58,7 +57,6 @@ public static class ValidateSection {
public Path hpJson;

@CommandLine.Option(names = {"-s", "--organ-system"},
arity = "*",
description = {"Organ system HPO term IDs",
"Default: empty"})
public List<String> organSystems = List.of();
Expand Down

0 comments on commit b051ea6

Please sign in to comment.