-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix retrieval of pflag stringArray #398
Conversation
`pflag.StringArray` suffers from the same problems as `StringSlice` did described in this issue spf13#112
I have run into this same bug in cobra+viper and just tried out your patch. I'm still getting an empty string in the array, instead of an empty array when the flag was not specified.
When I change my declaration of the flag from
I think fix this is close, because it is stripping out the extra square brackets, but it may need a bit more to remove the empty entry too. |
Switching from StringArray to StringSlice to workaround spf13/viper#398.
* Workaround StringArray bug in Viper Switching from StringArray to StringSlice to workaround spf13/viper#398. * Add failing test for viper bug Split up validation and command execution so that we can test them separately * Test remaining svcat command validation
Hello, could we merge this bugfix? |
This would be extremely helpful for k3d-io/k3d#506 to be fixed. I'd be happy to help, if needed. |
I believe some tests may push it forward |
Author: iwilltry42 <[email protected]> Date: Tue Mar 30 15:26:37 2021 +0200 [hotfix] use viper fork with fixed stringArray handling from spf13/viper#398
New flags added for - customProxyPort - disableReadinessProbe - customProxyReadinessPath - env vars Also updated viper to include bug fix for StringArrayP spf13/viper#398
New flags added for - customProxyPort - disableReadinessProbe - customProxyReadinessPath - env vars Also updated viper to include bug fix for StringArrayP spf13/viper#398 Signed-off-by: stoobmmelier <>
pflag.StringArray
suffers from the same problems asStringSlice
did described in this issue #112