You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The application also has a subcommand, called validate, which doesn't require that parameter, but takes a list of Files instead. However, when trying to execute the validate subcommand, i get the following error:
user@host:~ $ generator validate generated.xml
Missing required parameter: 'FILE'
Usage: generator [-dfhV] [-k=<keySize>] FILE [COMMAND]
Does a Thing with the Excel file.
FILE Excel input file
-d, --debug Show debugging output.
Default: false
-f, --force Overwrite existing output.
Default: false
-h, --help Show this help message and exit.
-k, --keylength=<keySize>
Set generated dictionary key length.
Default: 4
-V, --version Print version information and exit.
Commands:
help Displays help information about the specified command
validate Validate VDF schemas.
I can call the help subcommand on validate:
user@host:~ $ generator help validate
Usage: vdf-generator validate [-hV] SCHEMA...
Validates some XML files.
SCHEMA... An XML file, or a directory containing a number of XML files.
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
But trying to call the help mixin via -h returns the main usage message:
It seems either me or picocli is doing something wrong (I'm assuming it's me). Any suggestions?
(By making the FILE parameter arity "0..1" and manually validating whether it's been passed to the main command, I can get it to work. That doesn't quite feel like it's correct though.)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have a small application which reads a file, this is specified as in the main
@Command
class:The application also has a subcommand, called
validate
, which doesn't require that parameter, but takes a list of Files instead. However, when trying to execute the validate subcommand, i get the following error:I can call the help subcommand on
validate
:But trying to call the help mixin via
-h
returns the main usage message:It seems either me or picocli is doing something wrong (I'm assuming it's me). Any suggestions?
(By making the
FILE
parameter arity "0..1" and manually validating whether it's been passed to the main command, I can get it to work. That doesn't quite feel like it's correct though.)Beta Was this translation helpful? Give feedback.
All reactions