From 49de0d3331563537c2326ab3f170af801ff979a5 Mon Sep 17 00:00:00 2001 From: Matheus Fernandes Date: Tue, 17 Jan 2017 13:45:31 -0200 Subject: [PATCH] Print the error message for a aborted login in a new line (#229) --- lib/login.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/login.js b/lib/login.js index f34653b..c97ed03 100644 --- a/lib/login.js +++ b/lib/login.js @@ -55,7 +55,14 @@ function sleep(ms) { } async function register(url, {retryEmail = false} = {}) { - const email = await readEmail({invalid: retryEmail}) + let email + try { + email = await readEmail({invalid: retryEmail}) + } catch (err) { + process.stdout.write('\n') + throw err + } + process.stdout.write('\n') if (!validate(email)) {