Skip to content

Commit

Permalink
Move logic after err check
Browse files Browse the repository at this point in the history
  • Loading branch information
dvob committed Jan 8, 2021
1 parent fe4aca4 commit 099e178
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/crane/digest.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ func Digest(ref string, opt ...Option) (string, error) {
o := makeOptions(opt...)
if o.platform != nil {
desc, err := getManifest(ref, opt...)
if !desc.MediaType.IsIndex() {
return desc.Digest.String(), nil
}
if err != nil {
return "", err
}
if !desc.MediaType.IsIndex() {
return desc.Digest.String(), nil
}
img, err := desc.Image()
if err != nil {
return "", err
Expand Down

0 comments on commit 099e178

Please sign in to comment.