Skip to content

Commit d6c1709

Browse files
authored
Fix ignoring all images when --ignored-images option absent (deckhouse#57)
1 parent 358c329 commit d6c1709

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

main.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@ func main() {
6666
prometheus.MustRegister(liveTicksCounter)
6767

6868
var regexes []regexp.Regexp
69-
regexStrings := strings.Split(*ignoredImagesStr, "~")
70-
for _, regexStr := range regexStrings {
71-
regexes = append(regexes, *regexp.MustCompile(regexStr))
69+
if *ignoredImagesStr != "" {
70+
regexStrings := strings.Split(*ignoredImagesStr, "~")
71+
for _, regexStr := range regexStrings {
72+
regexes = append(regexes, *regexp.MustCompile(regexStr))
73+
}
7274
}
7375

7476
registryChecker := registry_checker.NewRegistryChecker(

0 commit comments

Comments
 (0)