m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2014-04-22 13:51:36 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2014-04-22 13:51:36 +0200
commit07bcfccebfa2f885849f0b8698a496c3c757d8a7 (patch)
tree54a6f9c441f3dbc2223af871d064e00c53c8415e
parent91ef9dbbea26573414220073dd92bba4b1d4c94a (diff)
insert: exit with error if EOF
-rwxr-xr-xsrc/password-store.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index 65e76b7..7ea5d4c 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -421,9 +421,9 @@ cmd_insert() {
local password
local password_again
while true; do
- read -r -p "Enter password for $path: " -s password || continue
+ read -r -p "Enter password for $path: " -s password || exit 1
echo
- read -r -p "Retype password for $path: " -s password_again || continue
+ read -r -p "Retype password for $path: " -s password_again || exit 1
echo
if [[ $password == "$password_again" ]]; then
$GPG -e "${GPG_RECIPIENT_ARGS[@]}" -o "$passfile" $GPG_OPTS <<<"$password"