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:
Ehsan Akhgari 2015-07-01 17:06:32 -04:00
Родитель bb5c403109
Коммит c1484ba42b
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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):