mirror of https://github.com/ryantm/agenix.git
Fix: don't try to copy non-existing files
This warning was printed when creating new encrypted file
This commit is contained in:
parent
daf42cb35b
commit
5687ab8e3c
|
@ -155,7 +155,10 @@ function edit {
|
|||
|
||||
decrypt "$FILE" "$KEYS" || exit 1
|
||||
|
||||
cp "$CLEARTEXT_FILE" "$CLEARTEXT_FILE.before"
|
||||
if [ -f "$CLEARTEXT_FILE" ]
|
||||
then
|
||||
cp "$CLEARTEXT_FILE" "$CLEARTEXT_FILE.before"
|
||||
fi
|
||||
|
||||
[ -t 0 ] || EDITOR='cp /dev/stdin'
|
||||
|
||||
|
|
Loading…
Reference in New Issue