mirror of
https://github.com/ryantm/agenix.git
synced 2024-12-22 15:48:30 +03:00
only backup cleartext file if it exists
Avoids complaints from `cp` about nonexistent files.
This commit is contained in:
parent
daf42cb35b
commit
4c48606094
1 changed files with 1 additions and 1 deletions
|
@ -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'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue