From db2f2e859bd20627eaaead85a9f2db3e1ac6d0dd Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Fri, 18 Oct 2024 03:06:12 -0400 Subject: [PATCH] fix(healthcheck): tmp fix for ignoring stdout & stderr file --- pkg/healthcheck/forbidden.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/pkg/healthcheck/forbidden.go b/pkg/healthcheck/forbidden.go index f7ce458..4f6944b 100644 --- a/pkg/healthcheck/forbidden.go +++ b/pkg/healthcheck/forbidden.go @@ -20,13 +20,7 @@ func getForbiddens(root string) ([]string, error) { return false }) - var err error - - if err != nil { - return nil, err - } - - err = filepath.Walk(root, func(path string, info os.FileInfo, err error) error { + err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error { if err != nil { return err } @@ -38,7 +32,10 @@ func getForbiddens(root string) ([]string, error) { return nil } } - + // TODO: remove this temporary fix for stdout and stderr + if path == root && (info.Name() == "stdout" || info.Name() == "stderr") { + return nil + } // Get the relative path to the git repo root relPath, err := filepath.Rel(root, path) if err != nil {