Skip to content

Commit

Permalink
Recursive calls to getConfigForTree could error
Browse files Browse the repository at this point in the history
Don't ignore the error
  • Loading branch information
mach6 authored and foosinn committed Aug 5, 2020
1 parent e26caba commit ad6876a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugin/configloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ func (p *Plugin) getConfigForTree(ctx context.Context, req *request, dir string,
for _, f := range ls {
var fileContent string
if f.Type == "dir" {
fileContent, _ = p.getConfigForTree(ctx, req, f.Path, depth)
fileContent, err = p.getConfigForTree(ctx, req, f.Path, depth)
if err != nil {
return "", err
}
} else if f.Type == "file" && f.Name == req.Repo.Config {
var critical bool
fileContent, critical, err = p.getDroneConfig(ctx, req, f.Path)
Expand Down

0 comments on commit ad6876a

Please sign in to comment.