-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
triage/needs-infoNeeds more investigation from maintainers or more info from the issue providerNeeds more investigation from maintainers or more info from the issue provider
Description
When using 'ExecuteContext' on the parent command, the context is not properly passed on to sub commands. It's passed on only the first time, then on the following invocations the first passed value is used. The culprit seems to be this section from commands.go:
// 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
}
the parent context should always be passed on to the child command, not just when the child context is null.
utku-caglayan and sfc-gh-jrewerts
Metadata
Metadata
Assignees
Labels
triage/needs-infoNeeds more investigation from maintainers or more info from the issue providerNeeds more investigation from maintainers or more info from the issue provider