|
|
|
@ -141,7 +141,7 @@ bool CCmdArgs::needAdditionalArg() const
|
|
|
|
|
const TArg &arg = _Args[i];
|
|
|
|
|
|
|
|
|
|
// they don't have any short or long name, but need a name in help
|
|
|
|
|
if (arg.shortName.empty() && arg.longName.empty() && !arg.helpName.empty() && arg.required)
|
|
|
|
|
if (arg.shortName.empty() && arg.longName.empty() && !arg.helpName.empty() && arg.required && !arg.found)
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -363,7 +363,7 @@ bool CCmdArgs::parse(const std::vector<std::string> &argv)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// process help if requested or if required arguments are missing
|
|
|
|
|
if (haveLongArg("help") || (needAdditionalArg() && !haveAdditionalArg()))
|
|
|
|
|
if (haveLongArg("help") || needAdditionalArg())
|
|
|
|
|
{
|
|
|
|
|
displayHelp();
|
|
|
|
|
return false;
|
|
|
|
|