fix(core): Exit with correct status code

This commit is contained in:
Michael Carlberg 2016-06-20 18:26:54 +02:00
parent 710bd32c26
commit 3adcb5fd61

View File

@ -66,7 +66,7 @@ int main(int argc, char **argv)
* Parse command line arguments * Parse command line arguments
*/ */
if (argc < 2 || cli::is_option(argv[1], "-h", "--help") || argv[1][0] == '-') if (argc < 2 || cli::is_option(argv[1], "-h", "--help") || argv[1][0] == '-')
cli::usage(usage, argc > 1); cli::usage(usage, (argc > 1 && cli::is_option(argv[1], "-h", "--help")));
cli::parse(2, argc, argv); cli::parse(2, argc, argv);
if (cli::has_option("help")) if (cli::has_option("help"))
cli::usage(usage); cli::usage(usage);