-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Issue passing local flag to subcommand #1825
Comments
Hi @IvanRibakov. I admit that I don't fully understand all these flag functions, but I use code I've seen work before. |
Hi @marckhouzam,
I'd still argue that original problem is a bug, or at a very minimum, a gap in documentation. |
The docs use the https://github.com/spf13/cobra/blob/main/user_guide.md#local-flags |
The Cobra project currently lacks enough contributors to adequately respond to all issues. This bot triages issues and PRs according to the following rules:
|
Hi @johnSchnake Does it make sense to update documentation and/or hide |
Hey folks 👋 I prepared a PR to clarify the documentation #2064 |
I have a root command with persistent flag and a subcommand with a local flag. When executing subcommand, I seem to be unable to pass the local flag. No matter how I do it, I get
Error: unknown flag:
.Here's the minimal example that reproduces my situation:
All of the above invocations produce an error
Error: unknown flag: --subFlag
:Can someone please explain me what am I missing here?
The text was updated successfully, but these errors were encountered: