Skip to content

Commit

Permalink
Merge pull request #176 from shivak/patch-1
Browse files Browse the repository at this point in the history
only backup cleartext file if it exists
  • Loading branch information
ryantm authored Nov 29, 2023
2 parents daf42cb + 4c48606 commit 13ac9ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/agenix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function edit {

decrypt "$FILE" "$KEYS" || exit 1

cp "$CLEARTEXT_FILE" "$CLEARTEXT_FILE.before"
[ ! -f "$CLEARTEXT_FILE" ] || cp "$CLEARTEXT_FILE" "$CLEARTEXT_FILE.before"

[ -t 0 ] || EDITOR='cp /dev/stdin'

Expand Down

0 comments on commit 13ac9ac

Please sign in to comment.