Skip to content

[BUG] Conflicting usage of -o flag for both --output and --overrides in CLI version 3.1.1 #208

@lfvJonas

Description

@lfvJonas

Describe the bug.

In @asyncapi/cli@3.1.1, the diff command help text shows that -o is used as a shorthand for both --output and --overrides.

Expected behavior

The -o flag should only map to one option, or both flags should have distinct shorthands.

Screenshots

Image

How to Reproduce

  1. Run the help command:
asyncapi diff --help
  1. Observe:
  -o, --output=<value>               The output file name. Omitting this flag the result will be printed in the console.
  -o, --overrides=<value>            path to JSON file containing the override properties
  1. Run the diff command using -o intending to set the output file:
asyncapi diff asyncapi-1.yaml asyncapi-2.yaml -o output.yml
  1. Observe:
DiffOverrideJSONError: Provided override file is not a valid JSON file

🖥️ Device Information [optional]

AsyncAPI CLI: @asyncapi/cli@3.1.1
Node.js: v22.15.0
OS: Ubuntu 24.04

👀 Have you checked for similar open issues?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions