]> git.notmuchmail.org Git - notmuch/commitdiff
new: Print final fatal error message to stderr
authorAustin Clements <amdragon@MIT.EDU>
Sun, 22 Apr 2012 15:50:51 +0000 (11:50 -0400)
committerDavid Bremner <bremner@debian.org>
Wed, 25 Apr 2012 02:25:52 +0000 (23:25 -0300)
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

index 2faf2f8e01029d4b933aa9041d3d7be7a5a40f6d..bf9b120949b6697650a681eb5c566b0e97bbfccb 100644 (file)
@@ -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);