diff --git a/ethsigner/commandline/src/main/java/tech/pegasys/ethsigner/CommandlineParser.java b/ethsigner/commandline/src/main/java/tech/pegasys/ethsigner/CommandlineParser.java index 8c6163ac1..aa7010cad 100644 --- a/ethsigner/commandline/src/main/java/tech/pegasys/ethsigner/CommandlineParser.java +++ b/ethsigner/commandline/src/main/java/tech/pegasys/ethsigner/CommandlineParser.java @@ -59,8 +59,10 @@ public boolean parseCommandLine(final String... args) { } try { - commandLine.parseWithHandlers(new RunLast().useOut(output), new ExceptionHandler<>(), args); + // parseArgs ensures all args are populated and can then be validated prior to any setup + commandLine.parseArgs(args); baseCommand.validateOptions(commandLine, LOG); + commandLine.parseWithHandlers(new RunLast().useOut(output), new ExceptionHandler<>(), args); return true; } catch (final ParameterException ex) { handleParameterException(ex);