From 9a57b701fd84e2becdabc423c4ed6848685d7ae3 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Fri, 18 Oct 2024 03:19:12 -0400 Subject: [PATCH] fix(healthcheck): tmp fix for ignoring stdout & stderr file again --- pkg/healthcheck/forbidden.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/healthcheck/forbidden.go b/pkg/healthcheck/forbidden.go index 4f6944b..37c70fc 100644 --- a/pkg/healthcheck/forbidden.go +++ b/pkg/healthcheck/forbidden.go @@ -32,15 +32,15 @@ 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 { return err } + // TODO: remove this temporary fix for stdout and stderr + if relPath == "stdout" || relPath == "stderr" { + return nil + } match := ignore.Relative(relPath, true) // Check if the relative file path should be ignored based on the .gitignore rules