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

Fix #150 require --path/-p arg to keys subcommands #165

Merged
merged 1 commit into from
Apr 25, 2018
Merged
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
9 changes: 3 additions & 6 deletions src/main/java/org/rundeck/client/tool/commands/Keys.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down