From ad6876afd6ff2004ae91f4aa96f806bb3d2fca37 Mon Sep 17 00:00:00 2001 From: Doug Simmons Date: Mon, 3 Aug 2020 13:08:28 -0700 Subject: [PATCH] Recursive calls to getConfigForTree could error Don't ignore the error --- plugin/configloader.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/configloader.go b/plugin/configloader.go index 006dd7e..f120e13 100644 --- a/plugin/configloader.go +++ b/plugin/configloader.go @@ -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)