summaryrefslogtreecommitdiffstats
path: root/commands/commands_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/commands_test.go')
-rw-r--r--commands/commands_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/commands_test.go b/commands/commands_test.go
index 376ca7976..907f003c0 100644
--- a/commands/commands_test.go
+++ b/commands/commands_test.go
@@ -118,6 +118,9 @@ func TestCommandsPersistentFlags(t *testing.T) {
root := b.addAll().build()
for _, c := range b.commands {
+ if c.getCommand() == nil {
+ continue
+ }
// We are only intereseted in the flag handling here.
c.getCommand().RunE = noOpRunE
}