spf13--cobra/site/content
vkhoroz 4cafa37bc4
Allow running persistent run hooks of all parents (#2044)
Currently, only one of the persistent pre-runs and post-runs is executed.
It is always the first one found in the parents chain, starting at this command.
Expected behavior is to execute all parents' persistent pre-runs and post-runs.

Dependent projects implemented various workarounds for this:
- manually building persistent hook chains (in every hook).
- applying some kind of monkey-patching on top of Cobra.

This change eliminates the necessity for such workarounds
by allowing to set a global variable EnableTraverseRunHooks.

Tickets:
- https://github.com/spf13/cobra/issues/216
- https://github.com/spf13/cobra/issues/252

Signed-off-by: Volodymyr Khoroz <volodymyr.khoroz@foundries.io>
2023-10-21 20:36:12 -04:00
..
completions Move documentation sources to site/content (#1428) 2023-06-20 17:15:36 -04:00
docgen Move documentation sources to site/content (#1428) 2023-06-20 17:15:36 -04:00
active_help.md Move documentation sources to site/content (#1428) 2023-06-20 17:15:36 -04:00
projects_using_cobra.md Move documentation sources to site/content (#1428) 2023-06-20 17:15:36 -04:00
user_guide.md Allow running persistent run hooks of all parents (#2044) 2023-10-21 20:36:12 -04:00