aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/keyringer/actions/edit6
1 files changed, 6 insertions, 0 deletions
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"