feat(healthcheck): use simpler ignore.Match
All checks were successful
submodules sync / sync (push) Successful in 1m13s
build / build (push) Successful in 3m27s
build / trigger-build-image (push) Successful in 10s

This commit is contained in:
张泊明518370910136 2025-06-10 21:20:21 -04:00
parent 0ea7672640
commit dff6e35572
GPG Key ID: D47306D7062CDA9D

View File

@ -32,12 +32,7 @@ func getForbiddens(root string) ([]string, error) {
return nil return nil
} }
} }
// Get the relative path to the git repo root match := ignore.Match(path)
relPath, err := filepath.Rel(root, path)
if err != nil {
return err
}
match := ignore.Relative(relPath, true)
// Check if the relative file path should be ignored based on the .gitignore rules // Check if the relative file path should be ignored based on the .gitignore rules
if match != nil && match.Ignore() { if match != nil && match.Ignore() {