Skip to content

invalid --distribution-spec flag returns wrong error information #897

Closed

Description

@qweeah

What happened in your environment?

If an invalid distribution flag is specified by --distribution-spec, the returned error message will imply wrong image specification.

$ oras attach --artifact-type oras.test localhost:5000/command/images:foobar --distribution-spec "???"
Error: unknown image specification flag: "???"

What did you expect to happen?

The returned error message should imply wrong distribution specification.

$ oras attach --artifact-type oras.test localhost:5000/command/images:foobar --distribution-spec "???"
Error: unknown distribution specification flag: "???"

How can we reproduce it?

Use an invalid distribution flag on a command that supports tuning distribution specification.

What is the version of your ORAS CLI?

1.0.0

What is your OS environment?

20.04

Are you willing to submit PRs to fix it?

  • Yes, I am willing to fix it.

Activity

  1. added
    good first issue
    ux
    on Mar 21, 2023
  2. added this to the v1.1.0 milestone on Mar 21, 2023
  3. added
    bug
    on Mar 22, 2023
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

    buggood first issueux

    Type

    No type

    Projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions