summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
Diffstat (limited to 'it.class')
-rw-r--r--it.class2
1 files changed, 2 insertions, 0 deletions
diff --git a/it.class b/it.class
index 3244ea4..509ec3d 100644
--- a/it.class
+++ b/it.class
@@ -715,6 +715,8 @@ static function getopt($helplines)
$mandatoryargs = array();
if ($tmp = trim(it::replace(array("\n.*" => "", "^\S+\s+\S+\s*" => "", "\[.*?\]\s*" => ""), trim($helplines))))
$mandatoryargs = preg_split('/\s+/', $tmp);
+ if ($mandatoryargs && !it::match("Usage:", $helplines))
+ it::error("Usage string must contain 'Usage:'");
foreach (array_slice($_SERVER['argv'], 1) as $arg)
{