Skip to content

Commit

Permalink
fix: reference correct secret parts in errors (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
wass3r committed Sep 8, 2021
1 parent e71f8bc commit c8edeac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pipeline/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (s *Secret) ParseOrg(org string) (string, string, error) {

// check if the org provided matches what we expect
if !strings.EqualFold(parts[0], org) {
return "", "", fmt.Errorf("%s: %s ", ErrInvalidOrg, org)
return "", "", fmt.Errorf("%s: %s ", ErrInvalidOrg, parts[0])
}

return parts[0], parts[1], nil
Expand Down Expand Up @@ -154,12 +154,12 @@ func (s *Secret) ParseRepo(org, repo string) (string, string, string, error) {

// check if the org provided matches what we expect
if !strings.EqualFold(parts[0], org) {
return "", "", "", fmt.Errorf("%s: %s ", ErrInvalidOrg, org)
return "", "", "", fmt.Errorf("%s: %s ", ErrInvalidOrg, parts[0])
}

// check if the repo provided matches what we expect
if !strings.EqualFold(parts[1], repo) {
return "", "", "", fmt.Errorf("%s: %s ", ErrInvalidRepo, repo)
return "", "", "", fmt.Errorf("%s: %s ", ErrInvalidRepo, parts[1])
}

return parts[0], parts[1], parts[2], nil
Expand Down

0 comments on commit c8edeac

Please sign in to comment.