-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
passthrough
passes through a flag as positional
#463
Comments
@dbohdan, in your example, you're defining Related: #435 |
To me, it seems
IMO, it is surprising and contradicts the readme that Also note that because of the flag behavior the |
Yep, I agree it is unexpected behaviour. |
I also found another strange behavior when upgrading to I don't know if I'm doing something wrong but we used the configuration below for a long time and it did exactly what we wanted: type runCommandFlags struct { // this defines the "terramate run" command
// <any other flags here>
Command []string `arg:"" name:"cmd" predictor:"file" passthrough:"" help:"Command to execute"`
} Before
But now:
Another regression was the handling of Is there a configuration change to retain the old behavior or is this a bug? |
@i4ki these aren't regressions, this is a behaviour change (modulo the bug this issue is for) - everything gets passed through. I'd be okay with optionally supporting the old behaviour via eg. |
This would be great. Besides |
That would be a breaking change |
I am suggesting |
Ah I see, it wasn't clear that was an alias. Sounds good. |
That is to say, I missed you saying it :) |
"partial" is implemented in 96647c3. |
Great! If this resolves it for @i4ki, you can close the issue. |
I have found a surprising
passthrough
behavior in Kong v1.2.1. The following example demonstrates it.Kong takes the first flag and passes it through as a positional argument. It seems like this should be an error. Instead of
-l
becoming a positional argument, I expected it to be treated as an unknown flag and flags to only be passed through after a non-flag argument.Edit: I have just learned about github.com/alecthomas/repr. :-)
The text was updated successfully, but these errors were encountered: