Add Parent FlagSet

Signed-off-by: fahed dorgaa <fahed.dorgaa@gmail.com>
This commit is contained in:
fahed dorgaa 2022-09-05 13:06:57 +00:00
parent 0580724b5f
commit 0c653d6e38

View file

@ -1672,7 +1672,7 @@ func (c *Command) Parent() *Command {
func (c *Command) mergePersistentFlags() { func (c *Command) mergePersistentFlags() {
c.updateParentsPflags() c.updateParentsPflags()
c.Flags().AddFlagSet(c.PersistentFlags()) c.Flags().AddFlagSet(c.PersistentFlags())
c.Flags().AddFlagSet(c.parentsPflags) c.Flags().AddParentFlagSet(c.parentsPflags)
} }
// updateParentsPflags updates c.parentsPflags by adding // updateParentsPflags updates c.parentsPflags by adding