aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorJan Sucan <jan@jansucan.com>2021-05-30 16:47:39 +0200
committerJan Sucan <jan@jansucan.com>2021-05-30 16:47:39 +0200
commite252807e866496107aa6e18b5ea0d7b29e5bb6a0 (patch)
tree8522e1abbe0c3ef528404f17594ff5ee92705ef7 /src/main.c
parent9ecdd5c0fd0b77682a6bbcfcfeb1d1014b1f538b (diff)
Change exit code on help option to 0
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index b6fdbbd..ef5d735 100644
--- a/src/main.c
+++ b/src/main.c
@@ -65,8 +65,10 @@ main(int argc, char **argv)
{
options_t opts;
- if (options_parse(argc, argv, &opts) || opts.help) {
+ if (options_parse(argc, argv, &opts)) {
options_usage(1);
+ } else if (opts.help) {
+ options_usage(0);
}
const bool is_action_backup = (opts.in_file_path != NULL);