mirror of
https://github.com/ryantm/agenix.git
synced 2024-11-22 17:50:48 +03:00
parent
63e9da1737
commit
b720b35bd7
1 changed files with 2 additions and 2 deletions
|
@ -114,7 +114,7 @@ function edit {
|
||||||
CLEARTEXT_DIR=$(@mktempBin@ -d)
|
CLEARTEXT_DIR=$(@mktempBin@ -d)
|
||||||
CLEARTEXT_FILE="$CLEARTEXT_DIR/$(basename "$FILE")"
|
CLEARTEXT_FILE="$CLEARTEXT_DIR/$(basename "$FILE")"
|
||||||
|
|
||||||
if [ -f "$FILE" ]
|
if [ -f "$FILE" ] && [ -t 0 ]
|
||||||
then
|
then
|
||||||
DECRYPT=("${DEFAULT_DECRYPT[@]}")
|
DECRYPT=("${DEFAULT_DECRYPT[@]}")
|
||||||
if [[ "${DECRYPT[*]}" != *"--identity"* ]]; then
|
if [[ "${DECRYPT[*]}" != *"--identity"* ]]; then
|
||||||
|
@ -142,7 +142,7 @@ function edit {
|
||||||
warn "$FILE wasn't created."
|
warn "$FILE wasn't created."
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
[ -f "$FILE" ] && [ "$EDITOR" != ":" ] && @diffBin@ -q "$CLEARTEXT_FILE.before" "$CLEARTEXT_FILE" && warn "$FILE wasn't changed, skipping re-encryption." && return
|
[ -f "$FILE" ] && [ "$EDITOR" != ":" ] && [ -f "$CLEARTEXT_FILE.before" ] && @diffBin@ -q "$CLEARTEXT_FILE.before" "$CLEARTEXT_FILE" && warn "$FILE wasn't changed, skipping re-encryption." && return
|
||||||
|
|
||||||
ENCRYPT=()
|
ENCRYPT=()
|
||||||
while IFS= read -r key
|
while IFS= read -r key
|
||||||
|
|
Loading…
Reference in a new issue