Closed spjwebster closed 7 years ago
Nice work, thanks! I wasn't aware of the "StringSlice" option type.
Good pickup on the Split
bug, too.
What happens with "StringSlice" flags and environment variables? More specifically, do we get support for specifying multiple KEY=VAL pairs via $KMS_ENCRYPTION_CONTEXT
?
Thanks for merging. The urfave/cli docs weren't clear on this, but checking the code environment variables support multiple key/value pairs separated by a comma, so KMS_ENCRYPTION_CONTEXT=foo=bar,baz=blah shush ...
is the same as shush -C foo=bar -C baz=blah ...
.
That's a good outcome, then. Thanks for checking.
AWS supports multiple KEY=VALUE pairs in the KMS encryption context, so shush should either support multiple --context arguments (implemented here) or support a separator for multiple KEY=VALUE pairs within the single --context arg.
This PR also changes the parsing of --context to allow additional
=
characters in the value portion of the string by splitting at the first=
only. I don't actually have a usecase here but it seems safer than the previous implementation that silently threw away=blah
infoo=bar=blah
.