-
Notifications
You must be signed in to change notification settings - Fork 201
Closed
Closed
Copy link
Labels
uxUser experience relatedUser experience related
Milestone
Description
When using oras attach
, if a user forgot to provide the subject artifact reference and only specifies one to-be-uploaded file, ORAS CLI will output (tested in bash, different shell might have different output):
> ARTIFACT=
> oras attach --artifact-type test/example $ARTIFACT./test.json
Error: neither file nor annotation provided in the command
Usage: oras attach [flags] --artifact-type=<type> <name>{:<tag>|@<digest>} <file>[:<layer_media_type>] [...]
To attach to an existing artifact, please provide files via argument or annotations via flag "--annotation". Run "oras attach -h" for more options and examplesdigest]
Input was parsed under a wrong consumption: user does specify subject artifact reference ./layers
, which actually is a file reference to be attached. This error can be avoided by parsing the only input argument. If the reference is valid, continue with current output. If it's not, give corresponding hint like:
Error: "./test.json" is an invalid artifact reference
Did you forget to specify a subject artifact?
Metadata
Metadata
Assignees
Labels
uxUser experience relatedUser experience related