@@ -88,6 +88,11 @@ func (f *FieldNames) Get() interface{} {
88
88
// Set's argument is a string to be parsed to set the flag.
89
89
// It's a space-separated list, so we split it.
90
90
func (f * FieldNames ) Set (value string ) error {
91
+ // When arguments are passed through YAML, escaped double quotes
92
+ // might be added to this string, and they would break the last
93
+ // key/value pair. This ensures the string is clean.
94
+ value = strings .Trim (value , "\" " )
95
+
91
96
fields := strings .Fields (value )
92
97
93
98
for _ , field := range fields {
@@ -123,6 +128,11 @@ func (f *FieldHeaderNames) Get() interface{} {
123
128
// Set's argument is a string to be parsed to set the flag.
124
129
// It's a space-separated list, so we split it.
125
130
func (f * FieldHeaderNames ) Set (value string ) error {
131
+ // When arguments are passed through YAML, escaped double quotes
132
+ // might be added to this string, and they would break the last
133
+ // key/value pair. This ensures the string is clean.
134
+ value = strings .Trim (value , "\" " )
135
+
126
136
fields := strings .Fields (value )
127
137
128
138
for _ , field := range fields {
0 commit comments