From ea0289885c1fc4a8621d3a68893d3c08a2716504 Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Mon, 9 Nov 2020 16:50:24 +0100 Subject: no longer ignore extra positional arguments --- it.class | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'it.class') diff --git a/it.class b/it.class index 74c9b7c..744c718 100644 --- a/it.class +++ b/it.class @@ -931,9 +931,7 @@ static function getopt($usage, $p = array()) $noopts = true; } - if (!$optionalargs && $result['args']) - it::error("Optional arguments passed to script without optional args in usage"); # FIXME 2020-10 NG merge with normal usage errors below - if ($err || $eat || $result['h'] || $result['help'] || $mandatoryargs) + if ($err || $eat || $result['h'] || $result['help'] || $mandatoryargs || (!$optionalargs && $result['args'])) { if (is_resource($out = $result['h'] || $result['help'] ? STDOUT : STDERR)) fputs($out, trim($usage) . "\n"); -- cgit v1.2.3