File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ function edit {
114114 CLEARTEXT_DIR=$( @mktempBin@ -d)
115115 CLEARTEXT_FILE=" $CLEARTEXT_DIR /$( basename " $FILE " ) "
116116
117- if [ -f " $FILE " ]
117+ if [ -f " $FILE " ] && [ -t 0 ]
118118 then
119119 DECRYPT=(" ${DEFAULT_DECRYPT[@]} " )
120120 if [[ " ${DECRYPT[*]} " != * " --identity" * ]]; then
@@ -142,7 +142,7 @@ function edit {
142142 warn " $FILE wasn't created."
143143 return
144144 fi
145- [ -f " $FILE " ] && [ " $EDITOR " != " :" ] && @diffBin@ -q " $CLEARTEXT_FILE .before" " $CLEARTEXT_FILE " && warn " $FILE wasn't changed, skipping re-encryption." && return
145+ [ -f " $FILE " ] && [ " $EDITOR " != " :" ] && [ -f " $CLEARTEXT_FILE .before " ] && @diffBin@ -q " $CLEARTEXT_FILE .before" " $CLEARTEXT_FILE " && warn " $FILE wasn't changed, skipping re-encryption." && return
146146
147147 ENCRYPT=()
148148 while IFS= read -r key
You can’t perform that action at this time.
0 commit comments