Skip to content

[BUG] mo purge -h is rejected as unknown option #1771

Open

Description

@viniciusdsandrade

Before submitting

  • I updated and reproduced the problem, or this report explains why I cannot update.

Describe the bug

Running mo purge -h fails with an unknown option error:

Unknown option: -h
Use 'mo purge --help' for usage information

Every other command in Mole (clean, uninstall, optimize, installer, history, touchid, completion, update, remove) accepts both -h and --help to display help information and exit with status 0. In bin/purge.sh line 340, the argument parsing case only matches "--help", rejecting -h with exit code 1. Furthermore, show_help in bin/purge.sh describes the flag as --help Show this help message rather than -h, --help Show this help message.

Commit analyzed: 8c55e8c076ae41a99ca094589d892fc0a7eb5137

Steps to reproduce

  1. Run command: mo purge -h
  2. See error:
    Unknown option: -h
    Use 'mo purge --help' for usage information
    
  3. Command exits with status code 1.

Expected behavior

mo purge -h should show usage information and exit with status code 0, matching mo purge --help and the behavior of all other Mole subcommands.

Debug logs

Debug output
$ mo purge -h
Unknown option: -h
Use 'mo purge --help' for usage information

Environment

Mole 1.61.0
macOS 15.0

Additional context

In tests/cli.bats, the test every command answers --help with usage and exit 0 covers --help across subcommands but does not assert -h.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions