diff --git a/core/tarantool.c b/core/tarantool.c index c679568286e7eb94839f034115b402b904bdb173..12efa6df30284255b615c4bc710bb6fe26e90f1a 100644 --- a/core/tarantool.c +++ b/core/tarantool.c @@ -448,7 +448,7 @@ main(int argc, char **argv) i = tarantool_cfg_iterator_init(); while ((key = tarantool_cfg_iterator_next(i, &cfg, &value)) != NULL) { - if (strcmp(key, cfg_paramname) == 0) { + if (strcmp(key, cfg_paramname) == 0 && value != NULL) { printf("%s\n", value); free(value); diff --git a/test/box/args.result b/test/box/args.result index 70ecd41660aaf359c6b270762a1885283b415417..c6e5528c54766ebb376b1afe5d4aa110bc7b26fe 100644 --- a/test/box/args.result +++ b/test/box/args.result @@ -38,6 +38,8 @@ Usage: tarantool_silverbox [OPTIONS] Please visit project home page at http://launchpad.net/tarantool to see online documentation, submit bugs or contribute a patch. +tarantool_silverbox --cfg-get=custom_proc_title + tarantool_silverbox -Z tarantool_silverbox: -Z: unknown option diff --git a/test/box/args.test b/test/box/args.test index d9146f3044cfcdd8a9b0375666c2bcecbe3a4c65..ee893918a0e9dd552d2004cbd274e654dcedf718 100644 --- a/test/box/args.test +++ b/test/box/args.test @@ -4,6 +4,7 @@ import os server.test_option("--help") server.test_option("-h") sys.stdout.push_filter("(/\S+)+/tarantool", "tarantool") +server.test_option("--cfg-get=custom_proc_title") server.test_option("-Z") server.test_option("--no-such-option") server.test_option("--version --no-such-option")