Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrecognized command options cause a crash #5

Open
goodmami opened this issue Sep 20, 2022 · 0 comments
Open

Unrecognized command options cause a crash #5

goodmami opened this issue Sep 20, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@goodmami
Copy link
Member

Calling the compiled repp command with an unknown option leads to a hard crash:

$ ./repp -h
terminate called after throwing an instance of 'boost::wrapexcept<boost::program_options::unknown_option>'
  what():  unrecognised option '-h'
zsh: IOT instruction (core dumped)  src/repp -h

It would be more useful if unrecognized options just show the usage. And apparently the help option is --help or -? (and -? needs to be quoted in some shells, like ZSH):

$ ./repp --help
Usage: src/repp [options] [input-file]
Options:
  -? [ --help ]         This usage information.
  -c [ --config ] arg   Configuration file (REQUIRED).
  --format arg          Token format: string, line, offsets, triple (default 
                        string).
  -r [ --rpp ] arg      Specify non-default location of directory containing 
                        repp modules. (Default locations are relative to the 
                        config file. See README.)
@goodmami goodmami added the bug Something isn't working label Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant