mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-28 12:45:27 +00:00
servo: Merge #4549 - Check for no parameters when invoking cargo (from laumann:master); r=jdm
When invoking `./mach cargo` the following error appeared ``` Error running mach: ['cargo'] The error occurred in the implementation of the invoked mach command. This should never occur and is likely a bug in the implementation of that command. Consider filing a bug for this issue. If filing a bug, please include the full output of mach, including this error message. The details of the failure are as follows: TypeError: can only concatenate list (not "NoneType") to list File "/home/tj/servo/python/servo/devenv_commands.py", line 24, in cargo return subprocess.call(["cargo"] + params, ``` it seems to be that all that's missing is checking whether params is None or not. Source-Repo: https://github.com/servo/servo Source-Revision: 3639c4e9818c5421659827b1da1844a9bbb792be
This commit is contained in:
parent
833bb336a1
commit
c9cca39080
@ -21,6 +21,8 @@ class MachCommands(CommandBase):
|
||||
'params', default=None, nargs='...',
|
||||
help="Command-line arguments to be passed through to Cargo")
|
||||
def cargo(self, params):
|
||||
if not params:
|
||||
params = []
|
||||
return subprocess.call(["cargo"] + params,
|
||||
env=self.build_env())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user