Skip to content

Commit

Permalink
Merge pull request #208 from ryantm/revert-206-feature/remove-trailin…
Browse files Browse the repository at this point in the history
…g-newlines-from-keys

Revert "feat: remove empty newlines from jq query"
  • Loading branch information
ryantm committed Oct 8, 2023
2 parents e2f3392 + dbc533d commit daf42cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/agenix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function cleanup {
trap "cleanup" 0 2 3 15

function keys {
(@nixInstantiate@ --json --eval --strict -E "(let rules = import $RULES; in rules.\"$FILE\".publicKeys)" | @jqBin@ -r 'map(rtrimstr("\n")) .[]') || exit 1
(@nixInstantiate@ --json --eval --strict -E "(let rules = import $RULES; in rules.\"$FILE\".publicKeys)" | @jqBin@ -r .[]) || exit 1
}

function decrypt {
Expand Down Expand Up @@ -185,7 +185,7 @@ function edit {
}

function rekey {
FILES=$( (@nixInstantiate@ --json --eval -E "(let rules = import $RULES; in builtins.attrNames rules)" | @jqBin@ -r 'map(rtrimstr("\n")) .[]') || exit 1)
FILES=$( (@nixInstantiate@ --json --eval -E "(let rules = import $RULES; in builtins.attrNames rules)" | @jqBin@ -r .[]) || exit 1)

for FILE in $FILES
do
Expand Down

0 comments on commit daf42cb

Please sign in to comment.