Changeset

1501:330b8437ac35

prosodyctl: Quit when user pressed ^C in password prompts
author Matthew Wild <mwild1@gmail.com>
date Wed, 08 Jul 2009 16:53:59 +0100
parents 1500:56d05ba00169
children 1502:0f895c06e03f
files prosodyctl
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/prosodyctl	Wed Jul 08 16:48:49 2009 +0100
+++ b/prosodyctl	Wed Jul 08 16:53:59 2009 +0100
@@ -158,6 +158,10 @@
 	while true do
 		io.write("Enter new password: ");
 		password = getpass();
+		if not password then
+			show_message("No password - cancelled");
+			return;
+		end
 		io.write("Retype new password: ");
 		if getpass() ~= password then
 			if not show_yesno [=[Passwords did not match, try again? [Y/n]]=] then