Change the way how the help is display
This commit is contained in:
parent
d8503cc26a
commit
1ae25f9a5f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user