summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2015-04-22 23:04:06 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2015-05-11 13:30:16 +0200
commit7cfe27de46138757ba325f4a13001b303454aba3 (patch)
treeccb5225fb1db521099333010ddea4d0eb420cfee
parent124ee6497e0defd44b9d215fcd7b37318e489fe7 (diff)
downloadpass-7cfe27de46138757ba325f4a13001b303454aba3.tar.gz
pass-7cfe27de46138757ba325f4a13001b303454aba3.tar.bz2
pass-7cfe27de46138757ba325f4a13001b303454aba3.zip
Exit 1 when gpg fails in multiline too.
Multiline insert errors gave a exit code of 0, now correctly propagated.
-rwxr-xr-xsrc/password-store.sh2
1 files changed, 1 insertions, 1 deletions
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