aboutsummaryrefslogtreecommitdiff
path: root/notmuch-setup.c
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2015-04-06 05:34:55 +0900
committerDavid Bremner <david@tethera.net>2015-06-01 07:32:54 +0200
commit447ad6b4984c71881b7f97641c77f0a39b71a991 (patch)
treefec61c03ae38f2d57a1483fe6aaf9f9ff080ac7d /notmuch-setup.c
parent0018a8d787a98f80c665061daa9b0c73839d3666 (diff)
cli: add standard option processing to config, help and setup
In particular this fixes a recently encountered bug where the "--config" argument to "notmuch setup" is silently ignored, which the unpleasant consequence of overwriting the users config file.
Diffstat (limited to 'notmuch-setup.c')
-rw-r--r--notmuch-setup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/notmuch-setup.c b/notmuch-setup.c
index 36a6171a..7dd5822a 100644
--- a/notmuch-setup.c
+++ b/notmuch-setup.c
@@ -145,6 +145,9 @@ notmuch_setup_command (notmuch_config_t *config,
chomp_newline (response); \
} while (0)
+ if (notmuch_minimal_options ("setup", argc, argv) < 0)
+ return EXIT_FAILURE;
+
if (notmuch_config_is_new (config))
welcome_message_pre_setup ();