pflag icon indicating copy to clipboard operation
pflag copied to clipboard

Make a Flag Dependant on Another Flag

Open jmickey opened this issue 6 years ago • 2 comments

From what I can tell it's not currently possible to mark a flag as dependant on another flag. Along the lines of "Flag B is only valid if Flag A is present".

Can someone confirm if this is the case? If so it would be awesome if it was something that could be supported!

Cheers

jmickey avatar Jul 01 '19 17:07 jmickey

At runtime you would need to check if flag A was set and error if flag B was not. There is no built in mechanism for this.

eparis avatar Jul 01 '19 19:07 eparis

This issue has not been updated in a long time. Is it still relevant?

(If I receive no answer before the end of the summer, I'll close it. Feel free to re-open if you come here after that happens and it is relevant to you - but if you do, please also comment and specify what outcome you're interested in!)

tomasaschan avatar Jul 16 '25 22:07 tomasaschan