Fix return codes for osrm-prepare

This commit is contained in:
Patrick Niklaus 2015-05-12 01:13:13 +02:00
parent 17a4463f59
commit 6ce2726a87
2 changed files with 3 additions and 3 deletions

View File

@ -100,13 +100,13 @@ ContractorOptions::ParseArguments(int argc, char *argv[], ContractorConfig &cont
if (option_variables.count("version")) if (option_variables.count("version"))
{ {
SimpleLogger().Write() << g_GIT_DESCRIPTION; SimpleLogger().Write() << g_GIT_DESCRIPTION;
return return_code::fail; return return_code::exit;
} }
if (option_variables.count("help")) if (option_variables.count("help"))
{ {
SimpleLogger().Write() << "\n" << visible_options; SimpleLogger().Write() << "\n" << visible_options;
return return_code::fail; return return_code::exit;
} }
boost::program_options::notify(option_variables); boost::program_options::notify(option_variables);

View File

@ -17,7 +17,7 @@ Feature: osrm-prepare command line options: help
And stdout should contain "--profile" And stdout should contain "--profile"
And stdout should contain "--threads" And stdout should contain "--threads"
And stdout should contain 15 lines And stdout should contain 15 lines
And it should exit with code 0 And it should exit with code 1
Scenario: osrm-prepare - Help, short Scenario: osrm-prepare - Help, short
When I run "osrm-prepare -h" When I run "osrm-prepare -h"