Change the way how the help is display
This commit is contained in:
parent
d8503cc26a
commit
1ae25f9a5f
@ -29,13 +29,16 @@ try {
|
|||||||
);
|
);
|
||||||
$opts->parse();
|
$opts->parse();
|
||||||
} catch (Zend_Console_Getopt_Exception $e) {
|
} catch (Zend_Console_Getopt_Exception $e) {
|
||||||
echo $e->getUsageMessage();
|
$displayUsage = true;
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Usage
|
// --- Aide / Options
|
||||||
if(isset($opts->help) || !isset($opts->id) && !isset($opts->file) )
|
if (count($opts->getOptions())==0 || isset($opts->help)) {
|
||||||
{
|
$displayUsage = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Usage
|
||||||
|
if ($displayUsage) {
|
||||||
echo $opts->getUsageMessage();
|
echo $opts->getUsageMessage();
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user