From e85f6b79adc752cbe282201280e36f003c346c56 Mon Sep 17 00:00:00 2001 From: Shiwei Zhang Date: Tue, 18 May 2021 09:06:19 +0800 Subject: [PATCH] consistent default media type (#271) Signed-off-by: Shiwei Zhang --- cmd/oras/push.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/oras/push.go b/cmd/oras/push.go index 1484a2ea8..587d48b6f 100644 --- a/cmd/oras/push.go +++ b/cmd/oras/push.go @@ -7,6 +7,7 @@ import ( "os" "path/filepath" + "github.com/oras-project/oras-go/pkg/artifact" "github.com/oras-project/oras-go/pkg/content" ctxo "github.com/oras-project/oras-go/pkg/context" "github.com/oras-project/oras-go/pkg/oras" @@ -110,7 +111,7 @@ func runPush(opts pushOptions) error { } } if opts.manifestConfigRef != "" { - filename, mediaType := parseFileRef(opts.manifestConfigRef, ocispec.MediaTypeImageConfig) + filename, mediaType := parseFileRef(opts.manifestConfigRef, artifact.UnknownConfigMediaType) file, err := store.Add(annotationConfig, mediaType, filename) if err != nil { return err