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

Misleading commandline help message #162

Closed
la-magra opened this issue Nov 29, 2022 · 3 comments
Closed

Misleading commandline help message #162

la-magra opened this issue Nov 29, 2022 · 3 comments

Comments

@la-magra
Copy link

$ bundle exec database_consistency -h
  Usage: database_consistency install - run installation
         database_consistency [options]
    -c, --config=FILE                Use additional configuration file.
    -g, --generate-todo              Generate TODO file with every failing check disabled. You can pass existing configurations so the generated file will have only new failures.
    -f, --autofixix                  Automatically fixes issues by adjusting the code or generating missing migrations.
    -h, --help                       Prints this help.
$ bundle exec database_consistency -f
bundler: failed to load command: database_consistency (/home/***/.gem/ruby/3.1.3/bin/database_consistency)
/home/***/.gem/ruby/3.1.3/gems/database_consistency-1.5.1/bin/database_consistency:52:in `<top (required)>': missing argument: -f (OptionParser::MissingArgument)
...
$ bundle exec database_consistency --autofixix
bundler: failed to load command: database_consistency (/home/***/.gem/ruby/3.1.3/bin/database_consistency)
/home/***/.gem/ruby/3.1.3/gems/database_consistency-1.5.1/bin/database_consistency:52:in `<top (required)>': invalid option: --autofixix (OptionParser::InvalidOption)
Did you mean?  autofix
...

probably due to

opts.on('-fix', '--autofix', 'Automatically fixes issues by adjusting the code or generating missing migrations.') do
first parameter having two extra characters.

@djezzzl
Copy link
Owner

djezzzl commented Nov 30, 2022

Hi @la-magra,

Thank you for using the gem and reporting the issue! Here is the fix: #165

It will be released by the end of today.

@djezzzl djezzzl closed this as completed Nov 30, 2022
@djezzzl
Copy link
Owner

djezzzl commented Nov 30, 2022

Released in 1.5.2. Thank you again! Have a great day!

@la-magra
Copy link
Author

Thank you, I wish you the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants