Skip to content

CLI runs successfully even when invalid arguments are passed #61

@SharpSeeEr

Description

@SharpSeeEr

Describe the bug
When invalid arguments are passed on the command line the program still runs successfully, ignoring any arguments it doesn't know about. I discovered this by accident when running it for the first time (ever): npx commit-and-tag-version --dr-run (note the misspelled word "dry").

Current behavior
Running npx commit-and-tag-version --dryrun results in the changelog being generated, version bumped, committed, and tagged.

Expected behavior
The program should exit with an error, potentially displaying the help

Environment

  • commit-and-tag-version version(s): 11.2.0
  • Node/npm version: Node 16.19.0, npm 9.3.0
  • OS: PopOS 22.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions