Skip to content

Improve output if invalid number of command line arguments are provided #458

@qweeah

Description

@qweeah

For all ORAS commands (login, logout, pull, push, attach, discover, copy), if the number of input argument doesn't match expected, user will get errors like:

Error: accepts X arg(s), received Y

It could confuse users who are not familiar with cobra concepts. E.g. they might think number of flags doesn't meet what is expected.

We need to provide more clear details for the error, including:

  1. what is expected
  2. what is got from input

Metadata

Metadata

Assignees

No one assigned

    Labels

    uxUser experience related

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions