Fix concatentation error on no args to ./mach rustc

Since default argument to params is None, concatenating it with a
list will raise an error.  This behaviour prevents `./mach rustc`
to be called when system-rust is defined in .servobuild.

Currently it will only work when followed by an argument, i.e.
`./mach rustc -arg`.

Testing this patch: `./mach rustc` should not raise an error.
This commit is contained in:
Andreas Tolfsen 2014-12-06 17:50:22 -08:00
parent 33836715a8
commit f716e8bbf1

View file

@ -48,6 +48,8 @@ class MachCommands(CommandBase):
'params', default=None, nargs='...',
help="Command-line arguments to be passed through to rustc")
def rustc(self, params):
if params is None:
params = []
return subprocess.call(["rustc"] + params, env=self.build_env())
@Command('rust-root',