From fe9bab31ad09cf6d9f0fe217fee865216f2ea625 Mon Sep 17 00:00:00 2001 From: Xiaoxuan Wang Date: Tue, 2 Apr 2024 06:53:58 +0000 Subject: [PATCH] fixed error Signed-off-by: Xiaoxuan Wang --- cmd/oras/internal/option/spec.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)) }