From 0c653d6e38adeb7bfd56af1715565b908ef9a890 Mon Sep 17 00:00:00 2001 From: fahed dorgaa Date: Mon, 5 Sep 2022 13:06:57 +0000 Subject: [PATCH] Add Parent FlagSet Signed-off-by: fahed dorgaa --- command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command.go b/command.go index 6e611337..8dd9c7fd 100644 --- a/command.go +++ b/command.go @@ -1672,7 +1672,7 @@ func (c *Command) Parent() *Command { func (c *Command) mergePersistentFlags() { c.updateParentsPflags() c.Flags().AddFlagSet(c.PersistentFlags()) - c.Flags().AddFlagSet(c.parentsPflags) + c.Flags().AddParentFlagSet(c.parentsPflags) } // updateParentsPflags updates c.parentsPflags by adding