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 @@ -130,7 +130,7 @@ function decrypt {
130130 err " There is no rule for $FILE in $RULES ."
131131 fi
132132
133- if [ -f " $FILE " ]
133+ if [ -f " $FILE " ] && [ -t 0 ]
134134 then
135135 DECRYPT=(" ${DEFAULT_DECRYPT[@]} " )
136136 if [[ " ${DECRYPT[*]} " != * " --identity" * ]]; then
@@ -171,7 +171,7 @@ function edit {
171171 warn " $FILE wasn't created."
172172 return
173173 fi
174- [ -f " $FILE " ] && [ " $EDITOR " != " :" ] && @diffBin@ -q -- " $CLEARTEXT_FILE .before" " $CLEARTEXT_FILE " && warn " $FILE wasn't changed, skipping re-encryption." && return
174+ [ -f " $FILE " ] && [ " $EDITOR " != " :" ] && [ -f " $CLEARTEXT_FILE .before " ] && @diffBin@ -q " $CLEARTEXT_FILE .before" " $CLEARTEXT_FILE " && warn " $FILE wasn't changed, skipping re-encryption." && return
175175
176176 ENCRYPT=()
177177 if [[ " $ARMOR " == " true" ]]; then
You can’t perform that action at this time.
0 commit comments