question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I get "Option 'version' is unknown" if it comes after other user-defined options on the command line

See original GitHub issue

Since 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:open
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
gbirchmeiercommented, Jul 20, 2020

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.

0reactions
rmunncommented, Aug 19, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found