You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update crane mutate annotation/label args to allow commas in label values (#1178)
With the current argument type, a common in a label value (a reasonable thing to have)
will be split and parsed as a separate label, and the client errors. This commit updates
the flag to StringToStringVarP so we start with a map[string]string off the bat, and do not
need to do special parsing beyond checking for empty strings.
Signed-off-by: vsoch <[email protected]>
Co-authored-by: vsoch <[email protected]>
mutateCmd.Flags().StringSliceVarP(&anntns, "annotation", "a", nil, "New annotations to add")
122
-
mutateCmd.Flags().StringSliceVarP(&lbls, "label", "l", nil, "New labels to add")
120
+
mutateCmd.Flags().StringToStringVarP(&annotations, "annotation", "a", nil, "New annotations to add")
121
+
mutateCmd.Flags().StringToStringVarP(&labels, "label", "l", nil, "New labels to add")
123
122
mutateCmd.Flags().StringVar(&entrypoint, "entrypoint", "", "New entrypoint to set")
124
123
mutateCmd.Flags().StringVarP(&newRef, "tag", "t", "", "New tag to apply to mutated image. If not provided, push by digest to the original image repository.")
125
124
returnmutateCmd
126
125
}
127
126
128
-
// splitKeyVals splits key value pairs which is in form hello=world
0 commit comments