fixed return value when invoking software with help flag
This commit is contained in:
parent
85cfe3c975
commit
bc94bb76c6
@ -19,5 +19,4 @@ int main(int ac, char** av)
|
|||||||
ImageManipulator image_process{input_file, output_file, iterations};
|
ImageManipulator image_process{input_file, output_file, iterations};
|
||||||
image_process.exec_method(method, controlled_size);
|
image_process.exec_method(method, controlled_size);
|
||||||
image_process.write_file();
|
image_process.write_file();
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ void processFilenames(po::variables_map const& vm,
|
|||||||
po::notify(vm);
|
po::notify(vm);
|
||||||
if (vm.count("help") || !vm.count("input")) {
|
if (vm.count("help") || !vm.count("input")) {
|
||||||
std::cout << desc << "\n";
|
std::cout << desc << "\n";
|
||||||
std::exit(1);
|
std::exit(!vm.count("help"));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto const input_path = vm["input"].as<path>();
|
auto const input_path = vm["input"].as<path>();
|
||||||
|
Loading…
Reference in New Issue
Block a user