Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oras discover shows wrong error message #1348

Closed
1 task
qweeah opened this issue Apr 16, 2024 · 1 comment · Fixed by #1354
Closed
1 task

oras discover shows wrong error message #1348

qweeah opened this issue Apr 16, 2024 · 1 comment · Fixed by #1354
Assignees
Labels
bug Something isn't working
Milestone

Comments

@qweeah
Copy link
Contributor

qweeah commented Apr 16, 2024

What happened in your environment?

If --output and --format are used at the same time, flag confliction error is output

> oras discover localhost:7000/demo:eol --format "{{.manifests}}" --output json
[DEPRECATED] --output is deprecated, try `--format json` instead
Error: if any flags in the group [output format] are set none of the others can be; [format output] were all set

But if the --output flag is used before --format, wrong error output is shown:

> oras discover localhost:7000/demo:eol --output json --format "{{.manifests}}"
Error: output type can only be tree, table or json

What did you expect to happen?

Should always show error message that both flags cannot be used at the same time

How can we reproduce it?

Run below command

oras discover localhost:7000/demo:eol --output json --format "{{.manifests}}"

What is the version of your ORAS CLI?

Main branch build from fa65f61

What is your OS environment?

Ubuntu 20.04

Are you willing to submit PRs to fix it?

  • Yes, I am willing to fix it.
@qweeah qweeah added bug Something isn't working triage New issues or PRs to be acknowledged by maintainers labels Apr 16, 2024
@qweeah
Copy link
Contributor Author

qweeah commented Apr 16, 2024

@wangxiaoxuan273 Can you also help fix this since the fix for #1340 can be applied to fix this issue?

@qweeah qweeah added this to the v1.2.0 milestone Apr 16, 2024
@qweeah qweeah removed the triage New issues or PRs to be acknowledged by maintainers label Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants