diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2018-10-18 16:30:47 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2018-10-18 16:30:47 +0300 |
commit | 147efc35461763c38e8875afac7bc44d2559204b (patch) | |
tree | 2a2ea0858c3af688f71df78b48901cbf273ce99e | |
parent | 505dd4d9170c1435777eb6fcd306d078056ea35e (diff) | |
download | ck-147efc35461763c38e8875afac7bc44d2559204b.tar.gz ck-147efc35461763c38e8875afac7bc44d2559204b.tar.bz2 ck-147efc35461763c38e8875afac7bc44d2559204b.zip |
Fix bug where help would not run if ck was not initialized
-rw-r--r-- | src/ck.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -44,12 +44,13 @@ int main(int argc, char *argv[]) { if (parse_action(argc, argv, &opt)) { goto error; } - /* If the action is init don't load the config, skip to running init*/ - if (opt.action != CKA_INIT) { + /* If the action is init or help don't load the config, skip to running it*/ + if (opt.action != CKA_INIT && + opt.action != CKA_HELP) { /* If the db doesn't exist ck is not initialized in the config * location specified in opt */ if (!db_exists(&opt)) { - ERR("ck is not initialized in %s.\nRun ck init first.\n", opt.confDir); + ERR("ck is not initialized in %s.\nRun ck init first.", opt.confDir); goto error; } /* Finally parse the config file and exit on error */ |