Skip to content
Snippets Groups Projects
Commit 07bcfcce authored by Jason A. Donenfeld's avatar Jason A. Donenfeld
Browse files

insert: exit with error if EOF

parent 91ef9dbb
No related branches found
No related tags found
No related merge requests found
...@@ -421,9 +421,9 @@ cmd_insert() { ...@@ -421,9 +421,9 @@ cmd_insert() {
local password local password
local password_again local password_again
while true; do 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 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 echo
if [[ $password == "$password_again" ]]; then if [[ $password == "$password_again" ]]; then
$GPG -e "${GPG_RECIPIENT_ARGS[@]}" -o "$passfile" $GPG_OPTS <<<"$password" $GPG -e "${GPG_RECIPIENT_ARGS[@]}" -o "$passfile" $GPG_OPTS <<<"$password"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment