From b516e74458edcc8a6dcd4c32db1a84653524b1ae Mon Sep 17 00:00:00 2001 From: Varconst Date: Thu, 23 Nov 2023 10:31:14 -0500 Subject: [PATCH] Child command context is not updated when global context changed #2077 --- command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command.go b/command.go index 2fbe6c131..b13f7c622 100644 --- a/command.go +++ b/command.go @@ -1108,7 +1108,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 }