diff --git a/command.go b/command.go index 4794e5eb..99f16b82 100644 --- a/command.go +++ b/command.go @@ -1139,11 +1139,8 @@ func (c *Command) ExecuteC() (cmd *Command, err error) { cmd.commandCalledAs.name = cmd.Name() } - // We have to pass global context to children command - // if context is present on the parent command. - if cmd.ctx == nil { - cmd.ctx = c.ctx - } + // Copy context + cmd.ctx = c.ctx err = cmd.execute(flags) if err != nil {