fix(Context.Run): Don't panic on unselected root node (#484)
This commit is contained in:
+3
-1
@@ -827,7 +827,9 @@ func (c *Context) Run(binds ...any) (err error) {
|
||||
if method.IsValid() {
|
||||
node = selected
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
if node == nil {
|
||||
return fmt.Errorf("no command selected")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user