mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 06:45:33 +00:00
Bug 1179488 - Accept any arguments passed to deprecated commands; r=gps
Without this, we throw UnrecognizedArgumentError when running commands such as `./mach mochitest-plain test`, which causes an error message such as the below to be emitted: It looks like you passed an unrecognized argument into mach. The mochitest-plain command does not accept the arguments: test This patch will fix the above command to instead print the corresponding deprecation message.
This commit is contained in:
parent
bb5c403109
commit
c1484ba42b
@ -230,7 +230,7 @@ class CommandAction(argparse.Action):
|
||||
setattr(command_namespace, name, extra)
|
||||
else:
|
||||
setattr(command_namespace, name, options.get('default', []))
|
||||
elif extra:
|
||||
elif extra and handler.cls.__name__ != 'DeprecatedCommands':
|
||||
raise UnrecognizedArgumentError(command, extra)
|
||||
|
||||
def _handle_main_help(self, parser, verbose):
|
||||
|
Loading…
x
Reference in New Issue
Block a user