Skip to content

Commit

Permalink
Correct check for parent context
Browse files Browse the repository at this point in the history
 - Comment states check parent, code checked child instead
  • Loading branch information
AtricoSoftware committed Oct 1, 2024
1 parent 78bfc83 commit bcffb99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion command.go
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,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
}

Expand Down

0 comments on commit bcffb99

Please sign in to comment.