mirror of
https://github.com/spf13/cobra
synced 2025-05-07 22:07:23 +00:00
Remove condition for passing ctx to child command
This commit is contained in:
parent
d58c46a0d6
commit
a081152dc5
1 changed files with 1 additions and 3 deletions
|
@ -949,9 +949,7 @@ func (c *Command) ExecuteC() (cmd *Command, err error) {
|
||||||
|
|
||||||
// We have to pass global context to children command
|
// We have to pass global context to children command
|
||||||
// if context is present on the parent command.
|
// if context is present on the parent command.
|
||||||
if cmd.ctx == nil {
|
cmd.ctx = c.ctx
|
||||||
cmd.ctx = c.ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
err = cmd.execute(flags)
|
err = cmd.execute(flags)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue