Skip to content

Commit

Permalink
fix attach opts
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvia Lei <lixlei@microsoft.com>
  • Loading branch information
Wwwsylvia committed Jan 30, 2023
1 parent 7ef338f commit e855493
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions cmd/oras/attach.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ Example - Attach file to the manifest tagged 'v1' in an OCI layout folder 'layou
cmd.Flags().StringVarP(&opts.artifactType, "artifact-type", "", "", "artifact type")
cmd.Flags().IntVarP(&opts.concurrency, "concurrency", "", 5, "concurrency level")
cmd.MarkFlagRequired("artifact-type")
opts.EnableDistributionSpecFlag()
option.ApplyFlags(&opts, cmd.Flags())
return cmd
}
Expand Down
4 changes: 0 additions & 4 deletions cmd/oras/internal/option/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package option

import (
"context"
"errors"
"fmt"
"os"
"strings"
Expand Down Expand Up @@ -84,9 +83,6 @@ func (opts *Target) Parse() error {
switch {
case opts.isOCILayout:
opts.Type = TargetTypeOCILayout
if opts.Remote.distributionSpec.referrersAPI != nil {
return errors.New("cannot enforce referrers API for image layout target")
}
return nil
default:
opts.Type = TargetTypeRemote
Expand Down

0 comments on commit e855493

Please sign in to comment.