Compare commits

...

4 Commits

Author SHA1 Message Date
James Taranto e1247c361a
Merge e2ad357a97 into 24a7ea3905 2024-04-26 15:00:14 +02:00
Ryan Mulligan 24a7ea3905
Merge pull request #256 from spectre256/main
fix: allow for newlines in keys
2024-04-26 05:59:12 -07:00
Ellis Gibbons 2c1d1fb134
fix: allow for newlines in keys 2024-04-12 17:50:07 -04:00
James Taranto e2ad357a97 fix: add --strict nix-instantiate to support builtins.readFile 2024-03-20 22:32:09 +11:00
1 changed files with 4 additions and 2 deletions

View File

@ -171,7 +171,9 @@ function edit {
ENCRYPT=()
while IFS= read -r key
do
ENCRYPT+=(--recipient "$key")
if [ -n "$key" ]; then
ENCRYPT+=(--recipient "$key")
fi
done <<< "$KEYS"
REENCRYPTED_DIR=$(@mktempBin@ -d)
@ -187,7 +189,7 @@ function edit {
}
function rekey {
FILES=$( (@nixInstantiate@ --json --eval -E "(let rules = import $RULES; in builtins.attrNames rules)" | @jqBin@ -r .[]) || exit 1)
FILES=$( (@nixInstantiate@ --json --eval --strict -E "(let rules = import $RULES; in builtins.attrNames rules)" | @jqBin@ -r .[]) || exit 1)
for FILE in $FILES
do