diff --git a/cmd/oras/internal/option/spec.go b/cmd/oras/internal/option/spec.go index 76410b7e7..f9bd50f23 100644 --- a/cmd/oras/internal/option/spec.go +++ b/cmd/oras/internal/option/spec.go @@ -80,8 +80,9 @@ func (is *ImageSpec) String() string { // ApplyFlags applies flags to a command flag set. func (is *ImageSpec) ApplyFlags(fs *pflag.FlagSet) { // default to auto - is.PackVersion = oras.PackManifestVersion1_1 defaultFlag := ImageSpecAuto + is.PackVersion = oras.PackManifestVersion1_1 + is.Flag = defaultFlag fs.Var(is, "image-spec", fmt.Sprintf(`[Experimental] specify manifest type for building artifact. Options: %s (default %q)`, is.Options(), defaultFlag)) }