mirror of
https://github.com/ryantm/agenix.git
synced 2024-12-22 15:48:30 +03:00
Merge pull request #176 from shivak/patch-1
only backup cleartext file if it exists
This commit is contained in:
commit
13ac9ac6d6
1 changed files with 1 additions and 1 deletions
|
@ -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'
|
||||
|
||||
|
|
Loading…
Reference in a new issue