Skip to content

Commit

Permalink
Merge pull request #123 from NASA-PDS/issue_121
Browse files Browse the repository at this point in the history
Improve `list-dd` CLI command argument handling
  • Loading branch information
jordanpadams authored Dec 12, 2024
2 parents a6fdae4 + 2c2101a commit 4692d60
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/main/java/gov/nasa/pds/registry/mgr/cmd/dd/ListDDCmd.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,16 @@ public void run(CommandLine cmdLine) throws Exception
return;
}

String url = cmdLine.getOptionValue("es", "app:/connections/direct/localhost.xml");
String authFile = cmdLine.getOptionValue("auth");

String namespace = cmdLine.getOptionValue("ns");

String url = cmdLine.getOptionValue("es", "app:/connections/direct/localhost.xml");

if (authFile == null || authFile.isBlank()) {
throw new IllegalArgumentException("missing argument: -auth must be given");
}
if (namespace == null || namespace.isBlank()) {
throw new IllegalArgumentException("missing argument: -ns must be given");
}
try
{
RegistryManager.init(url, authFile);
Expand Down

0 comments on commit 4692d60

Please sign in to comment.