From fbef7ac5973bc9a38b96cc9971828310c3c9428f Mon Sep 17 00:00:00 2001 From: Greg Schueler Date: Wed, 18 Apr 2018 15:54:23 -0700 Subject: [PATCH] Fix #150 require --path/-p arg to keys subcommands --- src/main/java/org/rundeck/client/tool/commands/Keys.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/rundeck/client/tool/commands/Keys.java b/src/main/java/org/rundeck/client/tool/commands/Keys.java index f171ec68..a055dfa3 100644 --- a/src/main/java/org/rundeck/client/tool/commands/Keys.java +++ b/src/main/java/org/rundeck/client/tool/commands/Keys.java @@ -76,12 +76,9 @@ interface PathArgs { @Option(shortName = "p", longName = "path", - description = "Storage path, default: keys/", - defaultValue = "keys/") + description = "Storage path in the form 'path/to/file', or 'keys/path/to/file'.", + defaultToNull = true) Path getPath(); - - @Unparsed(defaultToNull = true, description = "Storage path", name = "PATH") - Path getPath2(); } @CommandLineInterface(application = "list") interface ListArg extends PathArgs { @@ -110,7 +107,7 @@ public boolean list(ListArg options, CommandOutput output) throws IOException, I } private Path argPath(final PathArgs options) { - return options.getPath2() != null ? options.getPath2() : options.getPath(); + return options.getPath(); } @CommandLineInterface(application = "info") interface Info extends PathArgs {