Skip to content

Commit

Permalink
Do not set DEFAULT_DECRYPT in function edit
Browse files Browse the repository at this point in the history
Edit is called multiple times during rekey

fixes ryantm#272
  • Loading branch information
ck3d committed Oct 13, 2024
1 parent f6291c5 commit 2b11774
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkgs/agenix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 2b11774

Please sign in to comment.