diff options
author | Nathan Gass | 2020-11-09 16:50:24 +0100 |
---|---|---|
committer | Nathan Gass | 2020-11-09 16:52:06 +0100 |
commit | ea0289885c1fc4a8621d3a68893d3c08a2716504 (patch) | |
tree | 0134693fe40a96976f90fdff1bfc4662544cefe0 /it.class | |
parent | 572e1c052267cd34cbedfcb7d51cda35a55667c1 (diff) | |
download | itools-ea0289885c1fc4a8621d3a68893d3c08a2716504.tar.gz itools-ea0289885c1fc4a8621d3a68893d3c08a2716504.tar.bz2 itools-ea0289885c1fc4a8621d3a68893d3c08a2716504.zip |
no longer ignore extra positional arguments
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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"); |