From 2b11774452cd390f23f758855c8426901f8bef1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6gler?= Date: Sun, 13 Oct 2024 13:47:32 +0200 Subject: [PATCH] Do not set DEFAULT_DECRYPT in function edit Edit is called multiple times during rekey fixes #272 --- pkgs/agenix.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/agenix.sh b/pkgs/agenix.sh index 3d0415e..cd3212d 100644 --- a/pkgs/agenix.sh +++ b/pkgs/agenix.sh @@ -151,9 +151,8 @@ function edit { CLEARTEXT_DIR=$(@mktempBin@ -d) CLEARTEXT_FILE="$CLEARTEXT_DIR/$(basename "$FILE")" - DEFAULT_DECRYPT+=(-o "$CLEARTEXT_FILE") - decrypt "$FILE" "$KEYS" || exit 1 + decrypt "$FILE" "$KEYS" >"$CLEARTEXT_FILE" || exit 1 [ ! -f "$CLEARTEXT_FILE" ] || cp "$CLEARTEXT_FILE" "$CLEARTEXT_FILE.before"