From: Austin Clements <amdragon@MIT.EDU>
Date: Sun, 22 Apr 2012 15:50:51 +0000 (-0400)
Subject: new: Print final fatal error message to stderr
X-Git-Tag: 0.13_rc1~67
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=746fef0aeafe1f29720140ab8778cdee22d519cb;p=obsolete%2Fnotmuch-old

new: Print final fatal error message to stderr

This was going to stdout.  I removed the newline at the beginning of
printing the fatal error message because it wouldn't make sense if you
were only looking at the stderr stream (e.g., you had redirected
stdout to /dev/null).
---

diff --git a/notmuch-new.c b/notmuch-new.c
index 2faf2f8e..bf9b1209 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -1035,8 +1035,8 @@ notmuch_new_command (void *ctx, int argc, char *argv[])
     printf ("\n");
 
     if (ret)
-	printf ("\nNote: A fatal error was encountered: %s\n",
-		notmuch_status_to_string (ret));
+	fprintf (stderr, "Note: A fatal error was encountered: %s\n",
+		 notmuch_status_to_string (ret));
 
     notmuch_database_close (notmuch);