From 7cfe27de46138757ba325f4a13001b303454aba3 Mon Sep 17 00:00:00 2001 From: Anne Jan Brouwer Date: Wed, 22 Apr 2015 23:04:06 +0200 Subject: Exit 1 when gpg fails in multiline too. Multiline insert errors gave a exit code of 0, now correctly propagated. --- src/password-store.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/password-store.sh b/src/password-store.sh index 47f7ffa..7d57376 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -378,7 +378,7 @@ cmd_insert() { if [[ $multiline -eq 1 ]]; then echo "Enter contents of $path and press Ctrl+D when finished:" echo - $GPG -e "${GPG_RECIPIENT_ARGS[@]}" -o "$passfile" "${GPG_OPTS[@]}" + $GPG -e "${GPG_RECIPIENT_ARGS[@]}" -o "$passfile" "${GPG_OPTS[@]}" || exit 1 elif [[ $noecho -eq 1 ]]; then local password password_again while true; do -- cgit v1.2.3