Skip to content

PersistentPreRun only allowed once #252

Closed
@xh3b4sd

Description

Hello there. I am playing around with a command that defines a PersistentPreRun. This command has a sub command. This sub command as well wants to use PersistentPreRun. When the root command is executed its PersistentPreRun is executed as expected. When executing the sub command I expected both PersistentPreRuns to be executed, but only the sub command's PersistentPreRun is executed. I expect this as a bug. What do you guys think? Thanks for listening.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    area/libMethods and functions that exist in the cobra library and consumed by userskind/bugA bug in cobra; unintended behavior

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions