-
Notifications
You must be signed in to change notification settings - Fork 978
Open
Labels
area/storesnot-a-bugSOPS behaves as designed, though apparently not as the user expectedSOPS behaves as designed, though apparently not as the user expectedstores/dotenv
Description
Strings containing spaces are not quoted nor escaped in output dotenv files. The only way I've found to produce proper dotenv files in such case is manually quoting each space in the source yaml as quoting isn't possible (related issue #949).
To reproduce
# BAD
$ echo -e "FOO: Some long string with spaces" | sops encrypt --filename-override .yaml | sops decrypt --filename-override .yaml --output-type dotenv
FOO=Some long string with spaces
# BAD
$ echo -e "FOO: 'Some long string with spaces'" | sops encrypt --filename-override .yaml | sops decrypt --filename-override .yaml --output-type dotenv
FOO=Some long string with spaces
# GOOD
$ echo -e "FOO: Some\ long\ string\ with\ spaces" | sops encrypt --filename-override .yaml | sops decrypt --filename-override .yaml --output-type dotenv
FOO=Some\ long\ string\ with\ spacesExpected behavior
$ echo -e "FOO: Some long string with spaces" | sops encrypt --filename-override .yaml | sops decrypt --filename-override .yaml --output-type dotenv
FOO="Some long string with spaces"wesleycoder
Metadata
Metadata
Assignees
Labels
area/storesnot-a-bugSOPS behaves as designed, though apparently not as the user expectedSOPS behaves as designed, though apparently not as the user expectedstores/dotenv