Don't complain about unknown option if param is wrong
When a compound option was given an erroneous parameter, for example "OPTIONS=runmode:foo", you first got "Unknown runmode parameter 'foo", and then "Unknown option 'runmode:foo'". Prevent the Unknown option complaint, if we actually did find a match.
This commit is contained in:
@@ -472,6 +472,8 @@ parseoptions(register char *opts,boolean tinitial, boolean tfrom_file)
|
||||
|
||||
if (optresult == optn_silenterr)
|
||||
return FALSE;
|
||||
if (got_match && optresult == optn_err)
|
||||
return FALSE;
|
||||
if (optresult == optn_ok)
|
||||
return retval;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user