commit 7cfe27de46138757ba325f4a13001b303454aba3
parent 124ee6497e0defd44b9d215fcd7b37318e489fe7
Author: Anne Jan Brouwer <brouwer@annejan.com>
Date: Wed, 22 Apr 2015 23:04:06 +0200
Exit 1 when gpg fails in multiline too.
Multiline insert errors gave a exit code of 0, now correctly propagated.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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