From 0633cb2b50e7e66369596e3a5cb378a8be33fc88 Mon Sep 17 00:00:00 2001
From: Luke Smith <luke@lukesmith.xyz>
Date: Mon, 22 Apr 2019 23:59:43 -0400
Subject: error code fix

---
 bin/mw | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/bin/mw b/bin/mw
index 1cb1834..67caa18 100755
--- a/bin/mw
+++ b/bin/mw
@@ -179,6 +179,7 @@ tryconnect() { mkdir -p "$maildir/$title"
 		[ "$accounttype" = "online" ] && sed -i "/IMAPStore $title-remote$/,/# End profile/d" "$mbsyncrc"
 		printf "\033[32mMailboxes detected.\033[0m\\n"
 		echo "$mailboxes" | xargs -I {} mkdir -p "$maildir/$title/{}"
+		return 0
 	else
 		printf "\033[31m\033[31mLog-on not successful.\033[0m\\nIt seems that either you inputted the wrong password or sever settings, or there are other requirements for your account out of the control of mutt-wizard.\\n"
 		return 1
@@ -205,6 +206,7 @@ finalize() { \
 	echo "$boxes" | grep -i -m 1 junk | formatShortcut j junk
 	echo "$boxes" | grep -i -m 1 archive | formatShortcut a archive
 	[ "$accounttype" = "offline" ] && printf "All done.\\n\033[33mYou should now be able to run \`\033[32mmbsync %s\033[33m\` to begin to download your mail.\033[0m\\n" "$title"
+	return 0
 }
 
 confirm() { printf "Do you want to to %s? [y/N]\\n\t" "$@" && read -r input && ! echo "$input" | grep -i "^y$\|^yes$" >/dev/null && printf "That doesn't seem like a yes to me.\\n\\n" && return 1
-- 
cgit v1.2.3