diff --git a/command.go b/command.go index b6f8f4b1..68f07747 100644 --- a/command.go +++ b/command.go @@ -1110,7 +1110,7 @@ func (c *Command) ExecuteC() (cmd *Command, err error) { // We have to pass global context to children command // if context is present on the parent command. - if cmd.ctx == nil { + if c.ctx != nil { cmd.ctx = c.ctx }