Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Maid exits with 0 with invalid switchΒ #351

@coaxial

Description

@coaxial

πŸ‘‹ Before reporting a bug, please make sure you're running the latest available version of maid (gem install maid).

πŸ‘‹ If you're using Ruby 2.7+, please make sure you're running maid v0.10.0+ (gem install maid --pre)

Describe the bug
Maid exits with return code 0 when using an invalid switch.

To Reproduce
maid -version (note only one -)

Expected behavior
Output help and exit 1

Logs
If applicable, add logs to help explain your problem. You can find the logs at ~/.maid/maid.log.

Environment (please complete the information):

  • Maid version (maid --version): 0.11.1
  • OS, distribution (Linux), and version: Mint 22.1
  • Ruby version (ruby --version): 3.3.7

Minimal rules.rb to reproduce the issue:

# Rule(s)

Additional context

$ maid -version                                                                                                                               
Unknown switches "-version"                                                                                                                                               
Deprecation warning: Thor exit with status 0 on errors. To keep this behavior, you must define `exit_on_failure?` in `Maid::App`                                          
You can silence deprecations warning by setting the environment variable THOR_SILENCE_DEPRECATION. 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug reports

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions