Open n10v opened 7 years ago
This issue is being marked as stale due to a long period of inactivity
this seems like a "gotcha" that would be hard to discover/debug.
Maybe just call mergePersistentFlags
in VisitAll
🤔
It seems the same (if I'm not mistaken) applies for PersistentFlags
. A persistent flag should be available on the child commands too, but isn't in my tests.
As in the docs said:
But consider this script:
Output:
Only after the calling
child.LocalFlags()
user can see persistent flags inchild.Flags()
. I think, it's not obvious behaviour.P.S. Instead of
child.LocalFlags()
you can usechild.InheritedFlags()
or another function that callsc.mergePersistentFlags()
and you will see the same effect.