Browse Source

fix

Signed-off-by: Suleiman Dibirov <[email protected]>
Suleiman Dibirov 1 year ago
parent
commit
73bfbab54b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      pkg/watch/dockerignore.go

+ 1 - 1
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
 		})
 	}