diff --git a/cmd/oras/attach.go b/cmd/oras/attach.go index ba855bfba..bf73a9038 100644 --- a/cmd/oras/attach.go +++ b/cmd/oras/attach.go @@ -75,6 +75,7 @@ Example - Attach a file and add manifest annotations } cmd.Flags().StringVarP(&opts.artifactType, "artifact-type", "", "", "artifact type") + cmd.MarkFlagRequired("artifact-type") option.ApplyFlags(&opts, cmd.Flags()) return cmd }