From 5e9564f62128c681d8bbc3c319051f01b0ea5123 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 11 Mar 2023 13:57:58 -0300 Subject: Fix: edit: check whether decryption suceeded --- lib/keyringer/actions/edit | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/keyringer/actions/edit b/lib/keyringer/actions/edit index a480eea..ae4f4b0 100755 --- a/lib/keyringer/actions/edit +++ b/lib/keyringer/actions/edit @@ -24,6 +24,12 @@ keyringer_set_tmpfile $BASENAME.$EXTENSION # Decrypt the information to the file $GPG --yes -o "$TMPWORK" --use-agent -d "$KEYDIR/$FILE" +# Check whether decryption suceeded +if [ "$?" != "0" ]; then + echo "Error decrypting $FILE, aborting" + exit 1 +fi + # Action check if [ "$BASENAME" == "edit" ]; then APP="$EDITOR" -- cgit v1.2.3