Change the way how the help is display

This commit is contained in:
Michael RICOIS 2016-11-23 15:38:14 +01:00
parent d8503cc26a
commit 1ae25f9a5f

View File

@ -29,13 +29,16 @@ try {
);
$opts->parse();
} catch (Zend_Console_Getopt_Exception $e) {
echo $e->getUsageMessage();
exit;
$displayUsage = true;
}
//Usage
if(isset($opts->help) || !isset($opts->id) && !isset($opts->file) )
{
// --- Aide / Options
if (count($opts->getOptions())==0 || isset($opts->help)) {
$displayUsage = true;
}
// --- Usage
if ($displayUsage) {
echo $opts->getUsageMessage();
exit;
}