Skip to content

Commit 0d270e5

Browse files
authored
Merge pull request #2 from gmolau/Fix-error-reporting-and-root-path-handling
Fix error reporting and root path handling
2 parents 50b9ddf + cf8ef06 commit 0d270e5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func RewriteCodeownersRules(path string) ([]string, error) {
5252
var rewrittenRules []string
5353

5454
err = walkCodeownersFiles(root, func(coPath string) error {
55-
rules, procErr := processCodeownersFile(path, coPath)
55+
rules, procErr := processCodeownersFile(root, coPath)
5656
if procErr != nil {
5757
return procErr
5858
}
@@ -61,6 +61,10 @@ func RewriteCodeownersRules(path string) ([]string, error) {
6161
return nil
6262
})
6363

64+
if err != nil {
65+
return nil, fmt.Errorf("error while processing CODEOWNERS files: %w", err)
66+
}
67+
6468
return rewrittenRules, nil
6569
}
6670

0 commit comments

Comments
 (0)