Skip to content

improve error message of when a set of flags is required to use together #1357

@qweeah

Description

@qweeah

I am using ORAS built from 2edebad and trying to mTLS to a registry running at localhost:5000.

If only a cert file is provided without key, I will get error like:

> oras login localhost:5000 --cert-file test   
Error: if any flags in the group [cert-file key-file] are set they must all be set; missing [key-file]

The error message is hard to read since it does not explicitly tells what should be done to user, suggest to change it to:

> oras login localhost:5000 --cert-file test   
Error: --key-file is required but not provided

Metadata

Metadata

Labels

uxUser experience related

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions