Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaoxuan Wang <[email protected]>
  • Loading branch information
wangxiaoxuan273 committed Mar 28, 2024
1 parent 853756c commit 39155e8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/oras/internal/option/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ func (opts *Target) parseOCILayoutReference() error {
raw := opts.RawReference
var path string
var ref string

if idx := strings.LastIndex(raw, "@"); idx != -1 {
// `digest` found
path = raw[:idx]
Expand All @@ -130,8 +129,7 @@ func (opts *Target) parseOCILayoutReference() error {
var err error
path, ref, err = fileref.Parse(raw, "")
if err != nil {
err = errors.Join(err, errdef.ErrInvalidReference)
return err
return errors.Join(err, errdef.ErrInvalidReference)
}
}
opts.Path = path
Expand Down

0 comments on commit 39155e8

Please sign in to comment.