From: Michael Elkins Date: Tue, 10 Apr 2007 03:36:27 +0000 (-0700) Subject: Exit with a nonzero value if sending a message in batch mode fails (bug #2709). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e1bf4947cf9619028f24b9dc661ec200d464072;p=neomutt Exit with a nonzero value if sending a message in batch mode fails (bug #2709). --- diff --git a/main.c b/main.c index 66d771203..e84ac8003 100644 --- a/main.c +++ b/main.c @@ -924,10 +924,13 @@ int main (int argc, char **argv) mutt_free_list (&attach); } - ci_send_message (sendflags, msg, tempfile, NULL, NULL); + int rv = ci_send_message (sendflags, msg, tempfile, NULL, NULL); if (!option (OPTNOCURSES)) mutt_endwin (NULL); + + if (rv) + exit(1); } else {