Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include EnablePersistentHookOverride option to control Persistent*Run override behavior #1123

Closed
wants to merge 1 commit into from

Conversation

bartdeboer
Copy link

@bartdeboer bartdeboer commented May 25, 2020

Currently Cobra will only run the last Persistent*Run functions that are defined within the command chain. This introduces an EnablePersistentHookOverride option which allows to run all the functions throughout the command chain.

Resolves: #252, #219
Related PR's: #714, #220

@CLAassistant
Copy link

CLAassistant commented May 25, 2020

CLA assistant check
All committers have signed the CLA.

@bartdeboer bartdeboer changed the title Include EnableFullChainPersistence option to persist Pre/Post Run persistence throughout the command chain Include EnableFullChainPersistence option to run all Persistent Pre/Post hooks throughout the command chain May 26, 2020
@bartdeboer bartdeboer changed the title Include EnableFullChainPersistence option to run all Persistent Pre/Post hooks throughout the command chain Include EnableFullChainPersistence option to run all persistent Pre/Post hooks throughout the command chain May 26, 2020
@bartdeboer bartdeboer force-pushed the master branch 2 times, most recently from f01c3f9 to 5420672 Compare May 29, 2020 09:06
…ostRun* functions should override their parents
@bartdeboer bartdeboer changed the title Include EnableFullChainPersistence option to run all persistent Pre/Post hooks throughout the command chain Include EnablePersistentHookOverride option to control Persistent*Run override behavior May 29, 2020
@bartdeboer
Copy link
Author

PR #1142 is perhaps a better approach

@bartdeboer bartdeboer closed this Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PersistentPreRun only allowed once
2 participants