I get "Option 'version' is unknown" if it comes after other user-defined options on the command line
See original GitHub issueSince version
is pretty much built-in, it should never be “unknown”, especially if this message is immediately followed by helptext that clearly shows that it is a valid option.
3676 ~/fork/foo-etl$ dotnet etl/bin/Debug/netcoreapp3.0/etl.dll -c foo -d bar --version
etl 0.0.1
Copyright (C) 2020 etl
ERROR(S):
Option 'version' is unknown.
-c, --configdir Required. Path to dir that contains client configurations
-d, --invoicedir Required. Path to dir that contains invoices are
--help Display this help screen.
--version Display version information.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
distutils: How to pass a user defined parameter to setup.py?
The problem with this is it seems to change the install behaviour to the new command. It looks to me like the OP...
Read more >svn—Subversion Command-Line Client
While Subversion has different options for its subcommands, all options exist in a single namespace—that is, each option is guaranteed to mean the...
Read more >Getopt::Long - Extended processing of command line options
Simple options The call to GetOptions() parses the command line arguments that are present in @ARGV and sets the option variable to the...
Read more >describe-configuration-options
An indication of which type of values this option has and whether it is allowable to select one or more than one of...
Read more >picocli - a mighty tiny command line interface
Another idea is to add a separate different option (that could be named --password:env ) that takes an environment variable name parameter, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve just read the GNU standard regarding command-line params.
I now agree with you that (2) is the best option: params
--help
and--version
should cause all other params to be ignored.Since
--help
’s output includes the version,--version
can be ignored if both are present.This is fixed by #686, which allow
--help
and--version
to appear anywhere on the command line rather than only being handled in first position.