Skip to content
This repository has been archived by the owner on Aug 22, 2020. It is now read-only.

Commit

Permalink
Fix return values
Browse files Browse the repository at this point in the history
  • Loading branch information
tianon committed Jan 24, 2017
1 parent 3a995f9 commit 08ef5a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manifest/rfc2822.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,10 @@ func Parse2822(readerIn io.Reader) (*Manifest2822, error) {
}

if !GitFetchRegex.MatchString(entry.GitFetch) {
return fmt.Errorf(`Tags %q has invalid GitFetch (must be "refs/heads/..." or "refs/tags/..."): %q`, entry.TagsString(), entry.GitFetch)
return nil, fmt.Errorf(`Tags %q has invalid GitFetch (must be "refs/heads/..." or "refs/tags/..."): %q`, entry.TagsString(), entry.GitFetch)
}
if !GitCommitRegex.MatchString(entry.GitCommit) {
return fmt.Errorf(`Tags %q has invalid GitCommit (must be a commit, not a tag or ref): %q`, entry.TagsString(), entry.GitCommit)
return nil, fmt.Errorf(`Tags %q has invalid GitCommit (must be a commit, not a tag or ref): %q`, entry.TagsString(), entry.GitCommit)
}

err = manifest.AddEntry(entry)
Expand Down

0 comments on commit 08ef5a9

Please sign in to comment.