Skip to content

Commit

Permalink
Remove push mandate on subject
Browse files Browse the repository at this point in the history
Fixes oras-project#361

Does NOT fix oras-project/oras-go#206; since this client does not use the go library.

Signed-off-by: Nima Talebi <[email protected]>
  • Loading branch information
nima committed Jun 30, 2022
1 parent 58fa344 commit 6264e4f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/oras/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,17 +124,17 @@ func runPush(opts pushOptions) error {

// bake artifact
var pushOpts []oras.PushOpt
if opts.artifactType != "" {
if opts.artifactType != "" && opts.artifactRefs != "" {
var manifest ocispec.Descriptor
resolver, err = orasDocker.WithDiscover(opts.artifactRefs, resolver, orasDocker.NewOpts(ropts))
if err != nil {
return err
}

manifest, err := loadReference(ctx, resolver, opts.artifactRefs)
manifest, err = loadReference(ctx, resolver, opts.artifactRefs)
if err != nil {
return err
}

pushOpts = append(pushOpts, oras.AsArtifact(opts.artifactType, manifest))
}

Expand Down

0 comments on commit 6264e4f

Please sign in to comment.