Skip to content

Commit 1dc1450

Browse files
Fix regression that broke --only-scope (corneliusweig#88)
1 parent 6db0915 commit 1dc1450

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

internal/client/client.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,13 @@ func groupResources(cache bool, scope string, flags *genericclioptions.ConfigFla
116116
continue
117117
}
118118

119-
if (r.Namespaced && scopeCluster) || (!r.Namespaced && scopeNamespace) {
119+
if !((r.Namespaced && scopeNamespace) || (!r.Namespaced && scopeCluster)) {
120+
// The resource scope was disabled.
120121
continue
121122
}
122123

123124
// filter to resources that can be listed
124-
if len(r.Verbs) > 0 && !sets.NewString(r.Verbs...).HasAny("list", "get") {
125+
if !sets.NewString(r.Verbs...).HasAny("list", "get") {
125126
continue
126127
}
127128

0 commit comments

Comments
 (0)