File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ import (
99)
1010
1111func ShouldExpandWildcards (includes []string , excludes []string ) bool {
12+ // Empty includes is equivalent to * (match all) - don't expand
13+ if len (includes ) == 0 {
14+ return false
15+ }
16+
1217 wildcardFound := false
1318 for _ , include := range includes {
1419 // Special case: "*" alone means "match all" - don't expand
Original file line number Diff line number Diff line change @@ -68,6 +68,12 @@ func TestShouldExpandWildcards(t *testing.T) {
6868 excludes : []string {},
6969 expected : false ,
7070 },
71+ {
72+ name : "empty includes with wildcard excludes - should not expand" ,
73+ includes : []string {},
74+ excludes : []string {"ns*" },
75+ expected : false ,
76+ },
7177 {
7278 name : "complex wildcard patterns" ,
7379 includes : []string {"*-prod" },
@@ -104,6 +110,7 @@ func TestShouldExpandWildcards(t *testing.T) {
104110 excludes : []string {},
105111 expected : false , // plus is literal, not wildcard
106112 },
113+
107114 }
108115
109116 for _ , tt := range tests {
You can’t perform that action at this time.
0 commit comments