ryantm / agenix

age-encrypted secrets for NixOS and Home manager
https://matrix.to/#/#agenix:nixos.org
Creative Commons Zero v1.0 Universal
1.34k stars 108 forks source link

jq compile error during newline removal #207

Closed gmemstr closed 9 months ago

gmemstr commented 9 months ago

It seems that https://github.com/ryantm/agenix/commit/b5fa96a90e07cc099cc5247540449263caeedb16 introduced a regression in editing secrets. When editing any secret, the following error is produced:

jq: error: syntax error, unexpected '[', expecting FORMAT or QQSTRING_START (Unix shell quoting issues?) at <top-level>, line 1:
map(rtrimstr("\n")) .[]                     
jq: 1 compile error

Maybe some extra escaping is required around the rtrimstr?

ryantm commented 9 months ago

Reverted that for now. Thanks for the report.