X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-setup.c;h=36a6171a695b2bde194eab0dab3a577c91e265fe;hp=475248b1f9735b2e10f00f013deffa0baac85e7a;hb=3fed6736a7ef8b8b1f05d0fabb136bdd3b5917ee;hpb=f0dfda5c7797f9db81ce35d270fe0ac406c7fca1 diff --git a/notmuch-setup.c b/notmuch-setup.c index 475248b1..36a6171a 100644 --- a/notmuch-setup.c +++ b/notmuch-setup.c @@ -140,7 +140,7 @@ notmuch_setup_command (notmuch_config_t *config, fflush (stdout); \ if (getline (&response, &response_size, stdin) < 0) { \ printf ("Exiting.\n"); \ - exit (1); \ + exit (EXIT_FAILURE); \ } \ chomp_newline (response); \ } while (0) @@ -223,12 +223,11 @@ notmuch_setup_command (notmuch_config_t *config, g_ptr_array_free (tags, TRUE); } + if (notmuch_config_save (config)) + return EXIT_FAILURE; - if (! notmuch_config_save (config)) { - if (notmuch_config_is_new (config)) - welcome_message_post_setup (); - return 0; - } else { - return 1; - } + if (notmuch_config_is_new (config)) + welcome_message_post_setup (); + + return EXIT_SUCCESS; }