-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global flags aren't used/parsed #44
Comments
eparis
added a commit
to eparis/cobra
that referenced
this issue
Mar 19, 2015
Some project pick up flags from of projects the include. A great example would be projects that use glog and thus get all of those flags. Kubernetes, for example, merges those flags manually into it's commands. This was reported in spf13#44 What this patch does is merge those flags into the PersistentFlags on the highest parent. This allows kubernetes to stop having to merge things themselves...
eparis
added a commit
to eparis/cobra
that referenced
this issue
Mar 19, 2015
Some project pick up flags from of projects the include. A great example would be projects that use glog and thus get all of those flags. Kubernetes, for example, merges those flags manually into it's commands. This was reported in spf13#44 What this patch does is merge those flags into the PersistentFlags on the highest parent. This allows kubernetes to stop having to merge things themselves...
eparis
added a commit
to eparis/cobra
that referenced
this issue
Mar 19, 2015
Some projects pick up flags from other projects they include. A great example would be projects that use glog and thus get all of those flags. Kubernetes, for example, merges those flags manually into its commands. This was reported in spf13#44 What this patch does is merge those flags into the PersistentFlags on the highest parent. This allows kubernetes to stop having to merge things themselves...
This is now working! |
muscliary
added a commit
to muscliary/cobra
that referenced
this issue
Sep 12, 2023
Some projects pick up flags from other projects they include. A great example would be projects that use glog and thus get all of those flags. Kubernetes, for example, merges those flags manually into its commands. This was reported in spf13/cobra#44 What this patch does is merge those flags into the PersistentFlags on the highest parent. This allows kubernetes to stop having to merge things themselves...
desdeel2d0m
added a commit
to desdeel2d0m/cobra
that referenced
this issue
Jul 1, 2024
Some projects pick up flags from other projects they include. A great example would be projects that use glog and thus get all of those flags. Kubernetes, for example, merges those flags manually into its commands. This was reported in spf13/cobra#44 What this patch does is merge those flags into the PersistentFlags on the highest parent. This allows kubernetes to stop having to merge things themselves...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If someone creates a flag into the
pflag.CommandLine
flag set, it isn't imported/used/parsed. It should instead be merged with the rest of the persistent flags.The text was updated successfully, but these errors were encountered: