Merge pull request #176 from shivak/patch-1

only backup cleartext file if it exists
This commit is contained in:
Ryan Mulligan 2023-11-28 16:08:36 -08:00 committed by GitHub
commit 13ac9ac6d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,7 +155,7 @@ function edit {
decrypt "$FILE" "$KEYS" || exit 1 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' [ -t 0 ] || EDITOR='cp /dev/stdin'