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
Disabling all arguments after foreach #51
Conversation
Fixes #50. Uses `DisableFlagParsing` as per the documentation to disable the subsequent flag parsing in the command and leaving it as arguments to the shell command. Added `TraverseChildren` to rootCmd to allow -v and -h to be parsed. https://pkg.go.dev/github.com/spf13/cobra#Command Tested on Mac OS. I'm unable to write tests as we're not testing the flag parsing at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Nice that you got the TraverseChildren
one in too! 👍
I'm gonna hold off the merge for now, I'd really to figure out how docker did it and make sure we can come back and implement flags for the |
@sledigabel do you want to discuss this further? |
About to merge this; we'll get particular arguments for |
the `--` were needed for any command including parameters prior to #51. After #51, the `--` are no longer needed a cobra isn't trying to parse the full command. It's also failing the run now if the `--` are included since they are interpreted as part of the command. This commit fixes the documentation associated with `foreach`.
the `--` were needed for any command including parameters prior to #51. After #51, the `--` are no longer needed a cobra isn't trying to parse the full command. It's also failing the run now if the `--` are included since they are interpreted as part of the command. This commit fixes the documentation associated with `foreach`.
Fixes #50.
Uses
DisableFlagParsing
as per the documentation to disable thesubsequent flag parsing in the command and leaving it as arguments to
the shell command.
Added
TraverseChildren
to rootCmd to allow -v and -h to be parsed.https://pkg.go.dev/github.com/spf13/cobra#Command
Tested on Mac OS.
I'm unable to write tests as we're not testing the flag parsing at the
moment.