[PATCH 3/3] new: Print final fatal error message to stderr

Austin Clements amdragon at MIT.EDU
Mon Feb 27 07:49:19 PST 2012


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).
---
 notmuch-new.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/notmuch-new.c b/notmuch-new.c
index 0cbd479..9ad790d 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -1029,8 +1029,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);
 
-- 
1.7.7.3



More information about the notmuch mailing list