From 73bfbab54bd1c35cddbc96aae29e22677e6fc13f Mon Sep 17 00:00:00 2001 From: Suleiman Dibirov Date: Sun, 27 Oct 2024 08:40:00 +0200 Subject: [PATCH] fix Signed-off-by: Suleiman Dibirov --- pkg/watch/dockerignore.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/watch/dockerignore.go b/pkg/watch/dockerignore.go index 1e0eac14f..16650999c 100644 --- a/pkg/watch/dockerignore.go +++ b/pkg/watch/dockerignore.go @@ -134,7 +134,7 @@ func NewDockerPatternMatcher(repoRoot string, patterns []string) (*dockerPathMat if hasAllPattern { // Remove all non-exclusion patterns (those that don't start with '!') patterns = slices.DeleteFunc(patterns, func(p string) bool { - return len(p) > 0 && p[0] != '!' // Only keep exclusion patterns + return p != "" && p[0] != '!' // Only keep exclusion patterns }) }