Skip to content

Commit

Permalink
Switch back to error based on feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Hayden Blauzvern <[email protected]>
  • Loading branch information
haydentherapper committed Feb 10, 2022
1 parent 291ae81 commit 1c0bdc9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/cosign/tuf/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,10 @@ func (t *TUF) GetTargetsByMeta(usage UsageKind, fallbacks []string) ([]TargetFil
if scm.Sigstore.Usage == usage {
target, err := t.GetTarget(name)
if err != nil {
fmt.Fprintf(os.Stderr, "**Warning** Unable to fetch target %s, skipping target\n", name)
continue
} else {
matchedTargets = append(matchedTargets, TargetFile{Target: target, Status: scm.Sigstore.Status})
return nil, errors.Wrap(err, "error getting target")
}
matchedTargets = append(matchedTargets, TargetFile{Target: target, Status: scm.Sigstore.Status})

}
}
if len(matchedTargets) == 0 {
Expand Down

0 comments on commit 1c0bdc9

Please sign in to comment.